diff options
| author | Jack Nagel | 2013-08-09 20:39:17 -0500 |
|---|---|---|
| committer | Jack Nagel | 2013-08-10 19:01:50 -0500 |
| commit | 8508bdf98582805194c4e52a8d5531d5e77975d0 (patch) | |
| tree | 471a5e80c3f4231108908aa570bdb4d10ac27526 /Library/Homebrew/requirements | |
| parent | 9cdeb45d7bd50c608646cef61e23f3c898b05e58 (diff) | |
| download | homebrew-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.rb | 12 |
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 |
