-
Notifications
You must be signed in to change notification settings - Fork 739
Closed
Labels
bash compatCompatibility issues with bash or POSIX behaviorCompatibility issues with bash or POSIX behaviorfeaturehelp wanted
Milestone
Description
Node version (or tell us if you're using electron or some other framework):
v12.20.1
ShellJS version (the most recent version/Github branch you see the bug on):
0.8.4
Operating system:
Ubuntu 20.04 LTS
Description of the bug:
shell.exec
doesn't raise exit code if it is not zero.
Example ShellJS command to reproduce the error:
Here is the code I have:
#! /usr/bin/env node
const shell = require("shelljs");
shell.exec("jest --config jest.config.json --coverage");
Here is what I had to do to make this work properly:
#! /usr/bin/env node
const shell = require("shelljs");
shell.exec("jest --config jest.config.json --coverage", function (code) {
if (code !== 0) {
shell.exit(1);
}
});
Shouldn't this be the default behavior?
Metadata
Metadata
Assignees
Labels
bash compatCompatibility issues with bash or POSIX behaviorCompatibility issues with bash or POSIX behaviorfeaturehelp wanted