-
-
Notifications
You must be signed in to change notification settings - Fork 207
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
Use system_command
instead of Utils.popen_read
.
#595
Conversation
ab2ce27
to
1e2aa89
Compare
1e2aa89
to
f89f81a
Compare
lib/service/formula_wrapper.rb
Outdated
result = system_command(System.launchctl.to_s, args: ["list", service_name]) | ||
output = result.stdout.chomp | ||
|
||
if result.success? && output.present? | ||
success = true | ||
odebug cmd.join(" "), 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.
Does this still output the actual output of these commands or just the command being run?
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.
Only the command being run.
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.
The output is the important part though
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.
Do we need this debug output particularly often that it warrants outputting more than just the command? I think this is the only instance where we use odebug
this way.
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.
The command is actually the least relevant part of this function. The output will help developers figure out why something doesn't show up in the 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.
Do we need this debug output particularly often that it warrants outputting more than just the command?
Yes. I've done a lot of development on brew services
recently and this has been extremely useful.
If you're not doing brew services
development: I have no idea why you're running this with HOMEBREW_DEBUG
or --debug
?
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.
It's not that I'm running brew services
specifically in debug mode, I'm running everything in debug mode in CI and this just happens to have broken output now.
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.
Yeh, don't do that for your dot files 😁
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.
Needs to output the command output.
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
Previously, output would be broken when using
HOMEBREW_DEBUG=1
and--json
, sinceodebug
outputs tostdout
(maybe it should always output tostderr
?).SystemCommand
already automatically handlesHOMEBREW_DEBUG
, so let's use that instead of manually callingodebug
for every command here.Bug seen here: https://github.com/reitermarkus/dotfiles/actions/runs/6435999795/job/17478462126#step:3:14451