-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
Exit with failure on tap-info for unknown tap #21310
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
Exit with failure on tap-info for unknown tap #21310
Conversation
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.
Pull request overview
This PR implements failure exit behavior for the tap-info command when querying information about taps that are not installed, ensuring the command returns a non-zero exit code in such cases.
Key changes:
- Added
Homebrew.failed = truewhen a tap is not installed in the text output path - Added a test case to verify that
tap-infofails for unknown taps
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| Library/Homebrew/cmd/tap-info.rb | Sets the failure flag when displaying information for non-installed taps |
| Library/Homebrew/test/cmd/tap-info_spec.rb | Adds integration test verifying failure exit code for unknown taps |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
MikeMcQuaid
left a comment
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.
Looks good so far, thanks!
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
MikeMcQuaid
left a comment
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.
Thanks!
This applies the change for #21301
the top-level comment for tap-info is unneccessary, but the linter complained that it was missing, so applying the boyscout-rule here, even if it's unrelated to the PR.
brew lgtm(style, typechecking and tests) with your changes locally?