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
Description
Piping output from levant into a program doesn't work, everything goes to stderr.
Plan any job with the following command on linux and you can see that it's output is going to stderr. I'd expect you could grep for a string change, or pipe json results into jq which makes reading large jobs easier.
levant plan somejob.nomad | grep "a string you expect" - Grep doesn't work levant plan somejob.nomad |& grep "a string you expect" - Grep does work as stderr is combined into stdout
This helpful command will show stderr vs stdout { { levant plan yourjob.nomad; } 2>&3 | sed 's/^/STDOUT: /'; } 3>&1 1>&2 | sed 's/^/STDERR: /'
The issue appears to be within the os.Stdout.Fd check as when you pipe levant's output this check returns false causing everything to go to stderr.
Description
Piping output from levant into a program doesn't work, everything goes to stderr.
Plan any job with the following command on linux and you can see that it's output is going to stderr. I'd expect you could grep for a string change, or pipe json results into jq which makes reading large jobs easier.
levant plan somejob.nomad | grep "a string you expect"
- Grep doesn't worklevant plan somejob.nomad |& grep "a string you expect"
- Grep does work as stderr is combined into stdoutThis helpful command will show stderr vs stdout
{ { levant plan yourjob.nomad; } 2>&3 | sed 's/^/STDOUT: /'; } 3>&1 1>&2 | sed 's/^/STDERR: /'
The issue appears to be within the os.Stdout.Fd check as when you pipe levant's output this check returns false causing everything to go to stderr.
Output of
levant version
:The text was updated successfully, but these errors were encountered: