aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/dev-cmd
diff options
context:
space:
mode:
authorMike McQuaid2017-04-10 22:36:39 +0100
committerMike McQuaid2017-04-10 22:36:39 +0100
commit2c370f36776599a077abb71f40f58c1b7523052a (patch)
tree3b482d601d86ae635373e6524c5e969e44cf4072 /Library/Homebrew/dev-cmd
parent4d6e31999aa69d8498c87ceacc7fddaa5e3c409b (diff)
downloadbrew-2c370f36776599a077abb71f40f58c1b7523052a.tar.bz2
audit: check for more universal usage.
Also check for `ENV.universal_binary` and `build.universal?`. The prior is still required for `wine` and the latter should never be required any longer.
Diffstat (limited to 'Library/Homebrew/dev-cmd')
-rw-r--r--Library/Homebrew/dev-cmd/audit.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/Library/Homebrew/dev-cmd/audit.rb b/Library/Homebrew/dev-cmd/audit.rb
index ba6c3f333..1493e36ef 100644
--- a/Library/Homebrew/dev-cmd/audit.rb
+++ b/Library/Homebrew/dev-cmd/audit.rb
@@ -1049,6 +1049,14 @@ class FormulaAuditor
problem "Use ENV instead of invoking '#{$1}' to modify the environment"
end
+ if formula.name != "wine" && line =~ /ENV\.universal_binary/
+ problem "macOS has been 64-bit only since 10.6 so ENV.universal_binary is deprecated."
+ end
+
+ if line =~ /build\.universal\?/
+ problem "macOS has been 64-bit only so build.universal? is deprecated."
+ end
+
if line =~ /version == ['"]HEAD['"]/
problem "Use 'build.head?' instead of inspecting 'version'"
end