You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Node version (or tell us if you're using electron or some other framework):
all
ShellJS version (the most recent version/Github branch you see the bug on):
master
Operating system:
all
Description of the bug:
Setting config.fatal = true messes up shell.exec(). When config.fatal is true, we throw an exception from common.error(). Unfortunately, this gets caught by ShellJS and is treated like an internal error, which isn't correct.
Example ShellJS command to reproduce the error:
>shell.config.fatal=true;>shell.exec('cmd_that_fails');
Error: exec: internalerroratObject.error(/path/to/shelljs/src/common.js:130:27)atObject._exec(/path/to/shelljs/src/exec.js:292:12)atObject.exec(/path/to/shelljs/src/common.js:334:23)
at repl:1:3atsigintHandlersWrap(vm.js:22:35)atsigintHandlersWrap(vm.js:96:12)atContextifyScript.Script.runInThisContext(vm.js:21:12)atREPLServer.defaultEval(repl.js:313:29)atbound(domain.js:280:14)atREPLServer.runBound[aseval](domain.js:293:12)>// the exception is expected to contain the command's stderr
The text was updated successfully, but these errors were encountered:
Node version (or tell us if you're using electron or some other framework):
all
ShellJS version (the most recent version/Github branch you see the bug on):
master
Operating system:
all
Description of the bug:
Setting
config.fatal = true
messes upshell.exec()
. Whenconfig.fatal
is true, we throw an exception fromcommon.error()
. Unfortunately, this gets caught by ShellJS and is treated like aninternal error
, which isn't correct.Example ShellJS command to reproduce the error:
The text was updated successfully, but these errors were encountered: