Skip to content
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

Scope HOMEBREW_NO_INSTALL_FROM_API to core formulae in brew audit #14793

Merged
merged 1 commit into from Feb 24, 2023

Conversation

Bo98
Copy link
Member

@Bo98 Bo98 commented Feb 24, 2023

See #14701

@Bo98 Bo98 added the critical Critical change which should be shipped as soon as possible. label Feb 24, 2023
@BrewTestBot
Copy link
Member

Review period skipped due to critical label.

Copy link
Member

@MikeMcQuaid MikeMcQuaid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks for this @Bo98! Some nits but fine if this merges as-is if you disagree.

@@ -317,6 +317,12 @@ def with_custom_locale(locale, &block)
with_env(LC_ALL: locale, &block)
end

def without_api(&block)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this go into Library/Homebrew/dev-cmd/audit.rb as it's only used there?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would not be surprised if it is later used elsewhere e.g. brew test. But I guess I can shift it back to utils.rb later?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Bo98 Yup, or ideally something like Utils::API.without

odeprecated "brew audit [path ...]",
"brew audit [name ...]"
end
audit_formulae, audit_casks = without_api do
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comments explaining why this is needed would be nice here.

@@ -209,8 +211,12 @@ def audit
display_cop_names: args.display_cop_names?,
}.compact

fa = FormulaAuditor.new(f, **options)
fa.audit
audit_proc = proc { FormulaAuditor.new(f, **options).tap(&:audit) }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comments explaining why this is needed would be nice here.

Copy link
Member

@MikeMcQuaid MikeMcQuaid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks for adjusting!

@MikeMcQuaid MikeMcQuaid merged commit 64f453e into Homebrew:master Feb 24, 2023
@github-actions github-actions bot added the outdated PR was locked due to age label Mar 27, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
critical Critical change which should be shipped as soon as possible. outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants