aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/requirements
diff options
context:
space:
mode:
authorJack Nagel2013-08-09 20:39:17 -0500
committerJack Nagel2013-08-10 19:01:50 -0500
commit8508bdf98582805194c4e52a8d5531d5e77975d0 (patch)
tree471a5e80c3f4231108908aa570bdb4d10ac27526 /Library/Homebrew/requirements
parent9cdeb45d7bd50c608646cef61e23f3c898b05e58 (diff)
downloadhomebrew-8508bdf98582805194c4e52a8d5531d5e77975d0.tar.bz2
Allow specifying a custom PATH for which method
Closes #21794.
Diffstat (limited to 'Library/Homebrew/requirements')
-rw-r--r--Library/Homebrew/requirements/python_dependency.rb12
1 files changed, 3 insertions, 9 deletions
diff --git a/Library/Homebrew/requirements/python_dependency.rb b/Library/Homebrew/requirements/python_dependency.rb
index e84645da4..21d3c8af2 100644
--- a/Library/Homebrew/requirements/python_dependency.rb
+++ b/Library/Homebrew/requirements/python_dependency.rb
@@ -121,15 +121,9 @@ class PythonInstalled < Requirement
# Note, we don't support homebrew/versions/pythonXX.rb, though.
Formula.factory(@name).opt_prefix/"bin/python#{@min_version.major}"
else
- begin
- # Using the ORIGINAL_PATHS here because in superenv, the user
- # installed external Python is not visible otherwise.
- tmp_PATH = ENV['PATH']
- ENV['PATH'] = ORIGINAL_PATHS.join(':')
- which(@name)
- ensure
- ENV['PATH'] = tmp_PATH
- end
+ # Using the ORIGINAL_PATHS here because in superenv, the user
+ # installed external Python is not visible otherwise.
+ which(@name, ORIGINAL_PATHS.join(':'))
end
end
end