From 66d80cb114b43e64c7f1eb1a83951dcb4bc8f0d7 Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Mon, 27 Mar 2023 00:02:21 +0200 Subject: [PATCH] Allow running `audit` for different architecture. --- Library/Homebrew/cmd/fetch.rb | 4 ++-- Library/Homebrew/dev-cmd/audit.rb | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/cmd/fetch.rb b/Library/Homebrew/cmd/fetch.rb index 080aa17678..af75f9995e 100644 --- a/Library/Homebrew/cmd/fetch.rb +++ b/Library/Homebrew/cmd/fetch.rb @@ -20,9 +20,9 @@ module Homebrew Download a bottle (if available) or source packages for e and binaries for 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." diff --git a/Library/Homebrew/dev-cmd/audit.rb b/Library/Homebrew/dev-cmd/audit.rb index 3003a9e9bf..96fdb7aea1 100644 --- a/Library/Homebrew/dev-cmd/audit.rb +++ b/Library/Homebrew/dev-cmd/audit.rb @@ -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?