We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hello!
When you enable tracer via set -x, it breaks pipes.
install jq, then:
#!/bin/gosh set -x echo '{"number":1}' | jq '.number'
efect of this script should be:
1
is:
+ jq .number parse error: Invalid numeric literal at line 1, column 2
it could be even simpler without jq:
#!/bin/gosh set -x echo "test" | tee test.txt
in test.txt there is following content:
+ echo test test
in file interp/trace.go, line 28 I think we should set stderr as output stream. Otherwise printed traces become input of next command in the pipe.
The text was updated successfully, but these errors were encountered:
Nicely spotted - I think you're right:
$ bash -x -c 'echo foo' >/dev/null + echo foo $ bash -x -c 'echo foo' 2>/dev/null foo
Want to send a PR? cc @riacataquian
Sorry, something went wrong.
Sure - you have it :)
interp: trace should write to stderr by default
c780bb4
Fixes #926.
Successfully merging a pull request may close this issue.
Hello!
When you enable tracer via set -x, it breaks pipes.
how to reproduce?
install jq, then:
efect of this script should be:
is:
it could be even simpler without jq:
in test.txt there is following content:
where is problem?
in file interp/trace.go, line 28 I think we should set stderr as output stream. Otherwise printed traces become input of next command in the pipe.
The text was updated successfully, but these errors were encountered: