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?
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.execdoesn't raise exit code if it is not zero.Example ShellJS command to reproduce the error:
Here is the code I have:
Here is what I had to do to make this work properly:
Shouldn't this be the default behavior?