aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd
diff options
context:
space:
mode:
authorJack Nagel2013-05-07 18:39:45 -0500
committerJack Nagel2013-05-07 18:39:45 -0500
commitfedf9ddae3a55fccb99257a7a9b8152bdacee850 (patch)
tree920582c2f2192fcf75a28493633747a0300b91a7 /Library/Homebrew/cmd
parent57534cf7b2f76dd8f6e076d0b8e144c857f128c2 (diff)
downloadbrew-fedf9ddae3a55fccb99257a7a9b8152bdacee850.tar.bz2
audit: only set up the build environment once
Diffstat (limited to 'Library/Homebrew/cmd')
-rw-r--r--Library/Homebrew/cmd/audit.rb19
1 files changed, 9 insertions, 10 deletions
diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb
index 96b8df3e2..f84cd1295 100644
--- a/Library/Homebrew/cmd/audit.rb
+++ b/Library/Homebrew/cmd/audit.rb
@@ -7,6 +7,8 @@ module Homebrew extend self
formula_count = 0
problem_count = 0
+ ENV.setup_build_environment
+
ff = if ARGV.named.empty?
Formula
else
@@ -295,17 +297,14 @@ class FormulaAuditor
end
def audit_patches
- # Some formulae use ENV in patches, so set up an environment
- ENV.with_build_environment do
- Patches.new(f.patches).select { |p| p.external? }.each do |p|
- case p.url
- when %r[raw\.github\.com], %r[gist\.github\.com/raw]
- unless p.url =~ /[a-fA-F0-9]{40}/
- problem "GitHub/Gist patches should specify a revision:\n#{p.url}"
- end
- when %r[macports/trunk]
- problem "MacPorts patches should specify a revision instead of trunk:\n#{p.url}"
+ Patches.new(f.patches).select(&:external?).each do |p|
+ case p.url
+ when %r[raw\.github\.com], %r[gist\.github\.com/raw]
+ unless p.url =~ /[a-fA-F0-9]{40}/
+ problem "GitHub/Gist patches should specify a revision:\n#{p.url}"
end
+ when %r[macports/trunk]
+ problem "MacPorts patches should specify a revision instead of trunk:\n#{p.url}"
end
end
end