Skip to content

Using exec does not terminate the command process #1121

@laterdayi

Description

@laterdayi

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions