aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2015-03-05 20:48:47 -0500
committerJack Nagel2015-03-05 20:48:47 -0500
commit4d5c1526665bda7ccd3948e388bec27001ddd1e7 (patch)
treefee8dd28cf1f61f349abc80ec0c5b6f3f0957102 /Library
parentdb772eee8a50f8adaaae01eac6b5a59053a0f330 (diff)
downloadbrew-4d5c1526665bda7ccd3948e388bec27001ddd1e7.tar.bz2
Remove unnecessary nil check
The backticks will either return a string or raise an exception, so `executable` cannot be nil.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/requirements/python_dependency.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/Library/Homebrew/requirements/python_dependency.rb b/Library/Homebrew/requirements/python_dependency.rb
index 750db6c53..f5276cb4e 100644
--- a/Library/Homebrew/requirements/python_dependency.rb
+++ b/Library/Homebrew/requirements/python_dependency.rb
@@ -36,9 +36,7 @@ class PythonDependency < Requirement
def which_python
python = which python_binary
return unless python
- executable = `#{python} -c "import sys; print(sys.executable)"`.strip
- return unless executable
- Pathname.new executable
+ Pathname.new Utils.popen_read(python, "-c", "import sys; print(sys.executable)").strip
end
def system_python; "/usr/bin/#{python_binary}" end