Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redundant printing of stderr when using exec #891

Closed
joelruns opened this issue Oct 7, 2018 · 1 comment
Closed

Redundant printing of stderr when using exec #891

joelruns opened this issue Oct 7, 2018 · 1 comment
Labels
duplicate fix Bug/defect, or a fix for such a problem

Comments

@joelruns
Copy link

joelruns commented Oct 7, 2018

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
@nfischer
Copy link
Member

nfischer commented Oct 9, 2018

Known issue, duplicate of #851. Will be fixed by #861.

CC @uttpal

@nfischer nfischer closed this as completed Oct 9, 2018
@nfischer nfischer added the fix Bug/defect, or a fix for such a problem label Jan 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate fix Bug/defect, or a fix for such a problem
Projects
None yet
Development

No branches or pull requests

2 participants