aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/requirement.rb
diff options
context:
space:
mode:
authorJack Nagel2013-08-19 12:33:00 -0500
committerJack Nagel2013-08-19 12:33:00 -0500
commite1b6ebb4ff695b2d939c6a495bc5652b8e7d4ee1 (patch)
treec80181773baad3c8ba0b39e11288db629a6378ec /Library/Homebrew/requirement.rb
parenta1ce0dba1233f756a96abf15185dbccffe88ad3b (diff)
downloadhomebrew-e1b6ebb4ff695b2d939c6a495bc5652b8e7d4ee1.tar.bz2
No longer call ENV.userpaths! in requirements
Instead we use which with a custom PATH.
Diffstat (limited to 'Library/Homebrew/requirement.rb')
-rw-r--r--Library/Homebrew/requirement.rb9
1 files changed, 5 insertions, 4 deletions
diff --git a/Library/Homebrew/requirement.rb b/Library/Homebrew/requirement.rb
index 0e021a959..c756c6f93 100644
--- a/Library/Homebrew/requirement.rb
+++ b/Library/Homebrew/requirement.rb
@@ -94,6 +94,10 @@ class Requirement
end
end
+ def which(cmd)
+ super(cmd, ORIGINAL_PATHS.join(File::PATH_SEPARATOR))
+ end
+
class << self
attr_rw :fatal, :build, :default_formula
@@ -118,10 +122,7 @@ class Requirement
if instance_variable_defined?(:@satisfied)
@satisfied
elsif @options[:build_env]
- ENV.with_build_environment do
- ENV.userpaths!
- yield @proc
- end
+ ENV.with_build_environment { yield @proc }
else
yield @proc
end