Closed TerryHowe closed 5 days ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 85.22%. Comparing base (
f8519a9
) to head (f411046
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
It just came to me: If user resets command output (via SetErr) should we also set the err output stream for logging?
I created and issue to investigate the logging idea. I'm not sure.
As to go scripting, I think it should work just like shell scripting. By default stdout and stderr go to the current file descriptors. If the user wants to redirect stdout or stderr, they should be allowed to do that. Currently, they can only redirect stdout.
By default stdout and stderr go to the current file descriptors.
One tricky point is that go scripting allows running several commands in parallel, and assign each run different files for stdout and stderr. Logging should go to the user-assigned stderr (but not need to be done in this PR).
Created issue https://github.com/oras-project/oras-www/issues/357
What this PR does / why we need it:
Use the
cmd.ErrOrStderr()
for error output. This is more consistent and go scripting will be able to capture stderr.This should be the final PR for the printer although it may be worth looking at where things are and to see what could be improved.