Allow running audit for different architecture.

This commit is contained in:
Markus Reiter 2023-03-27 00:02:21 +02:00
parent 5c56cb73c6
commit 66d80cb114
No known key found for this signature in database
GPG Key ID: 245293B51702655B
2 changed files with 10 additions and 2 deletions

View File

@ -20,9 +20,9 @@ module Homebrew
Download a bottle (if available) or source packages for <formula>e
and binaries for <cask>s. For files, also print SHA-256 checksums.
EOS
# This is needed for testing cask downloads on CI.
# This is needed for downloading ARM casks in CI.
flag "--arch=",
description: "Download for the given arch.",
description: "Download for the given CPU architecture.",
hidden: true
flag "--bottle-tag=",
description: "Download a bottle for given tag."

View File

@ -31,6 +31,10 @@ module Homebrew
locally available formulae and casks and skip style checks. Will exit with a
non-zero status if any errors are found.
EOS
# This is needed for auditing ARM casks in CI.
flag "--arch=",
description: "Audit the given CPU architecture.",
hidden: true
switch "--strict",
description: "Run additional, stricter style checks."
switch "--git",
@ -104,6 +108,10 @@ module Homebrew
def self.audit
args = audit_args.parse
if (arch = args.arch)
SimulateSystem.arch = arch.to_sym
end
Homebrew.auditing = true
inject_dump_stats!(FormulaAuditor, /^audit_/) if args.audit_debug?