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
Improve odebug
/SystemCommand
debugging output.
#16098
Improve odebug
/SystemCommand
debugging output.
#16098
Conversation
odebug
/SystemCommand
debugging output.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make odebug always output to stderr so it doesn't break normal output (e.g. when piping --json output).
I think this should be opt-in probably so it's grep
able more easily but am open to thoughts from @Homebrew/maintainers if anyone else disagrees.
Also add a new print_stdout: :debug option to SystemCommand which outputs the full command output to stderr when HOMEBREW_DEBUG/--debug is set.
This is a great idea!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sending debug output to stderr makes sense to me, including doing so unconditionally. Fine with making it opt-out if someone needs it, but it's not something I'd personally use.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, cool, fine with me, thanks @reitermarkus! A legit test failure needs fixed and then good to 🚢.
Yeah, the test is a bit flaky, I assume due to |
brew style
with your changes locally?brew typecheck
with your changes locally?brew tests
with your changes locally?Make
odebug
always output tostderr
so it doesn't break normal output (e.g. when piping--json
output).Also add a new
print_stdout: :debug
option toSystemCommand
which outputs the full command output tostderr
whenHOMEBREW_DEBUG
/--debug
is set.Needed for Homebrew/homebrew-services#595.