Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using exec does not terminate the command process #1121

Open
laterdayi opened this issue Mar 24, 2023 · 1 comment
Open

Using exec does not terminate the command process #1121

laterdayi opened this issue Mar 24, 2023 · 1 comment

Comments

@laterdayi
Copy link

laterdayi commented Mar 24, 2023

Node version (or tell us if you're using electron or some other framework):

last

ShellJS version (the most recent version/Github branch you see the bug on):

last

Operating system:

windows

Description of the bug:

Using exec does not terminate the command process

Example ShellJS command to reproduce the error:

const scripts = {
  dev: 'vite',
  predev:'scripts'
};


exec('dev', function (code, stdout, stderr) {});

When I execute dev, predev will be executed first according to the life cycle of npm. I have some logical judgments in predev. If I make an error, I will exit(1) the terminal command process, but when I use shelljs.exec('dev'), When predev is executed first, the command process will not be interrupted even if there is an error

@laterdayi
Copy link
Author

@nfischer looking forward to your help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant