From a03120868f1e7f2022db70046e92ffa8e197cd48 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Mon, 19 Aug 2013 12:33:00 -0500 Subject: No longer call ENV.userpaths! in requirements Instead we use which with a custom PATH. --- Library/Homebrew/requirement.rb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'Library/Homebrew/requirement.rb') 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 -- cgit v1.2.3