diff --git a/bin/dotbot b/bin/dotbot index a2ffe9a..6232a50 100755 --- a/bin/dotbot +++ b/bin/dotbot @@ -7,9 +7,9 @@ # is useful because we don't know the name of the python binary. ''':' # begin python string; this line is interpreted by the shell as `:` -which python >/dev/null 2>&1 && exec python "$0" "$@" -which python3 >/dev/null 2>&1 && exec python3 "$0" "$@" -which python2 >/dev/null 2>&1 && exec python2 "$0" "$@" +command -v python >/dev/null 2>&1 && exec python "$0" "$@" +command -v python3 >/dev/null 2>&1 && exec python3 "$0" "$@" +command -v python2 >/dev/null 2>&1 && exec python2 "$0" "$@" >&2 echo "error: cannot find python" exit 1 ''' diff --git a/test/tests/find-python-executable.bash b/test/tests/find-python-executable.bash index d4fa7eb..9a91a74 100644 --- a/test/tests/find-python-executable.bash +++ b/test/tests/find-python-executable.bash @@ -31,7 +31,7 @@ touch ~/tmp_bin/python && chmod +x ~/tmp_bin/python && cat >> ~/tmp_bin/python <