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:
parent
db772eee8a
commit
4d5c152666
@ -36,9 +36,7 @@ class PythonDependency < Requirement
|
|||||||
def which_python
|
def which_python
|
||||||
python = which python_binary
|
python = which python_binary
|
||||||
return unless python
|
return unless python
|
||||||
executable = `#{python} -c "import sys; print(sys.executable)"`.strip
|
Pathname.new Utils.popen_read(python, "-c", "import sys; print(sys.executable)").strip
|
||||||
return unless executable
|
|
||||||
Pathname.new executable
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def system_python; "/usr/bin/#{python_binary}" end
|
def system_python; "/usr/bin/#{python_binary}" end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user