Oops, redo/whichpython.do would fail if python2.7 didn't exist.

This commit is contained in:
Avery Pennarun 2019-06-21 00:27:40 +09:00
commit 8924fa35fa

View file

@ -1,7 +1,7 @@
exec >&2
for py in python2.7 python2 python; do
for py in intentionally-missing python2.7 python2 python; do
echo "Trying: $py"
cmd=$(command -v "$py")
cmd=$(command -v "$py" || true)
# intentionally using the 'print statement' (as opposed to print
# function) here, to rule out any python3 interpreters
out=$($cmd -c 'print "success"' 2>/dev/null) || true