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
Can't suppress stdout for echo #899
Comments
Thanks for the report! Glad to hear there's more interest in this feature. It's currently not feasible to suppress stdout with We're tracking an alternate redirection syntax in #800. This would remove the technical limitation, at which point I would agree we should mute output upon redirection. I'm not sure if we'll ever be able to support silencing in pipes, unless we radically change the syntax. |
Closing this for now, since I think we can track this in #800. |
@nfischer is it also not possible to silence I would have thought that just suppressing the call to |
This isn't a param to be parsed, it's an argument to our arg-parsing function (see
So, it's WAI that There's an argument to be made for |
Node version (or tell us if you're using electron or some other framework):
v8.11.3
ShellJS version (the most recent version/Github branch you see the bug on):
0.8.2
Operating system:
Mac OS X
Description of the bug:
There doesn't seem to be a way to suppress stdout from
echo()
even when redirecting to another command / pipe.Based on the code, it seems like no matter what, the call to
sys.stdout.write()
will happen.shelljs/src/echo.js
Lines 58 to 60 in 4bd22e7
Example ShellJS command to reproduce the error:
(given a file
testfile
without the string asdfasdf at the beginning of a line):In this case, whether
{silent: true}
(which it seems like it's supposed to be parsed, tho not do anything, based onshelljs/src/echo.js
Lines 38 to 40 in 4bd22e7
testfile
. Also, in this case,{silent: true}
gets added to the file as well.The above code also doesn't suppress stdout.
The text was updated successfully, but these errors were encountered: