From 8924fa35fa7363b531f8e6b48a1328d2407ad5cf Mon Sep 17 00:00:00 2001 From: Avery Pennarun Date: Fri, 21 Jun 2019 00:27:40 +0900 Subject: [PATCH] Oops, redo/whichpython.do would fail if python2.7 didn't exist. --- redo/whichpython.do | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/redo/whichpython.do b/redo/whichpython.do index c3c4bcf..d5c54bb 100644 --- a/redo/whichpython.do +++ b/redo/whichpython.do @@ -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