Merge pull request #15063 from reitermarkus/audit-arch
Allow running `audit` for different architecture.
This commit is contained in:
commit
46c0df1379
@ -20,9 +20,9 @@ module Homebrew
|
|||||||
Download a bottle (if available) or source packages for <formula>e
|
Download a bottle (if available) or source packages for <formula>e
|
||||||
and binaries for <cask>s. For files, also print SHA-256 checksums.
|
and binaries for <cask>s. For files, also print SHA-256 checksums.
|
||||||
EOS
|
EOS
|
||||||
# This is needed for testing cask downloads on CI.
|
# This is needed for downloading ARM casks in CI.
|
||||||
flag "--arch=",
|
flag "--arch=",
|
||||||
description: "Download for the given arch.",
|
description: "Download for the given CPU architecture.",
|
||||||
hidden: true
|
hidden: true
|
||||||
flag "--bottle-tag=",
|
flag "--bottle-tag=",
|
||||||
description: "Download a bottle for given tag."
|
description: "Download a bottle for given tag."
|
||||||
|
|||||||
@ -31,6 +31,10 @@ module Homebrew
|
|||||||
locally available formulae and casks and skip style checks. Will exit with a
|
locally available formulae and casks and skip style checks. Will exit with a
|
||||||
non-zero status if any errors are found.
|
non-zero status if any errors are found.
|
||||||
EOS
|
EOS
|
||||||
|
# This is needed for auditing ARM casks in CI.
|
||||||
|
flag "--arch=",
|
||||||
|
description: "Audit the given CPU architecture.",
|
||||||
|
hidden: true
|
||||||
switch "--strict",
|
switch "--strict",
|
||||||
description: "Run additional, stricter style checks."
|
description: "Run additional, stricter style checks."
|
||||||
switch "--git",
|
switch "--git",
|
||||||
@ -104,6 +108,10 @@ module Homebrew
|
|||||||
def self.audit
|
def self.audit
|
||||||
args = audit_args.parse
|
args = audit_args.parse
|
||||||
|
|
||||||
|
if (arch = args.arch)
|
||||||
|
SimulateSystem.arch = arch.to_sym
|
||||||
|
end
|
||||||
|
|
||||||
Homebrew.auditing = true
|
Homebrew.auditing = true
|
||||||
inject_dump_stats!(FormulaAuditor, /^audit_/) if args.audit_debug?
|
inject_dump_stats!(FormulaAuditor, /^audit_/) if args.audit_debug?
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user