-
Notifications
You must be signed in to change notification settings - Fork 740
Description
Node version (or tell us if you're using electron or some other framework):
v10.11.0
ShellJS version (the most recent version/Github branch you see the bug on):
0.8.2
Operating system:
High Sierra
Description of the bug:
When using synchronous exec
for some reason after running the command, exec
itself prints exec: [stderr]
to console again. I have searched the documentation, the issues, and the code but can't seem to figure out how to silence this. My usage is for react-scripts test
via create-react-app
and linting with flow
. Is it possible to stop this post-exec
reprinting of stderr
and if not would it be reasonable to request removing this behavior?
Using the silent option for exec
does the opposite of what I want. All the output is silenced except this exec: [stderr]
reprinting. Setting silent with config
kills everything. This is especially troublesome with testing since test cases get printed live then after testing completes, the entire log gets printed again but prefixed with exec:
.
Example ShellJS command to reproduce the error:
To illustrate if I do something stupid like:
shell.exec('cat nonexistentfile');
I get in output:
cat: nonexistentfile: No such file or directory
exec: cat: nonexistentfile: No such file or directory