Remove unnecessary nil check

The backticks will either return a string or raise an exception, so
`executable` cannot be nil.
This commit is contained in:
Jack Nagel 2015-03-05 20:48:47 -05:00
parent db772eee8a
commit 4d5c152666

View File

@ -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