-
-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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 cask audit #15977
Improve cask audit #15977
Conversation
@EricFromCanada Does this seem reasonable? |
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.
Makes sense to me and would be good to fix affected casks.
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.
Makes sense from here 👍
I guess I should check if a nil brew/Library/Homebrew/cask/audit.rb Line 185 in 12c8778
|
Depends on how likely is it for a cask's homepage to vary depending on the version it installs. |
- check for cask.url in audit steps - check for cask.version in audit steps - check for cask.sha256 in fetch command - stop omitting casks based on nil url in audit command It would be nice to be able to omit casks from the audit if the os is not supported but there is not easy way to do that without updating the SimulateSystem code or refactoring how MacOSRequirement's are defined in the DSL.
213af1a
to
1dc9274
Compare
I added a two more online only ones. There are probably a few more out there but we can fix them as they come up. |
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 again @apainintheneck!
brew style
with your changes locally?brew typecheck
with your changes locally?brew tests
with your changes locally?Another follow-up to #15943 and #15956.
It would be nice to be able to omit casks from the audit if the os is not supported but there is not easy way to do that without updating the SimulateSystem code or refactoring how MacOSRequirement's are defined in the DSL.
At the end of the day, these changes make it so that you won't try to fetch a cask if the url or sha256 is missing (we'd expect the sha256 value to be
:no_check
if it's been omitted on purpose). It also allows the audit to accept casks with nil urls and versions since we already check for those. The problem was that we had some audit steps which assumed those values would be valid (non-nil) and now they don't.Results for
brew audit --skip-style homebrew/cask/calhash -os=all --debug