formula_auditor: require --git only if not --strict

The Git log is required only when `--strict` is not passed. This check
should still run with one of `--strict` or `--git`, but currently
passing `--strict` also requires `--git` in order to run this check.

This will still not be done during `tap_syntax` jobs after this change.
This commit is contained in:
Carlo Cabrera 2022-08-25 23:16:26 +08:00
parent fb2b21b298
commit 665b6ca5c5
No known key found for this signature in database
GPG Key ID: C74D447FC549A1D0

View File

@ -406,9 +406,8 @@ module Homebrew
end end
def audit_gcc_dependency def audit_gcc_dependency
return unless @git
return unless @core_tap return unless @core_tap
return if !@strict && !formula.tap.git? # git log is required for non-strict audit return if !@strict && !@git && !formula.tap.git? # git log is required for non-strict audit
return unless Homebrew::SimulateSystem.simulating_or_running_on_linux? return unless Homebrew::SimulateSystem.simulating_or_running_on_linux?
return unless linux_only_gcc_dep?(formula) return unless linux_only_gcc_dep?(formula)