summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnish Athalye <me@anishathalye.com>2019-06-26 15:00:07 -0400
committerAnish Athalye <me@anishathalye.com>2019-06-26 15:00:07 -0400
commit9a8d292681ac540894dce3fe998be0068dfa2df5 (patch)
treef6fe09d7b8d35e074c591f130dd56db535fa6481
parent8454021d667fdec2897fa03e977677efca5cfe6a (diff)
Make launcher prefer python over python3
This patch makes the launcher script prefer `python`, when present, over `python3`. This way, the launcher uses the user's preferred `python` (which is often set up as a symbolic link to a particular python2.x or python3.x), when available.
-rwxr-xr-xbin/dotbot2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/dotbot b/bin/dotbot
index 123fc93..a2ffe9a 100755
--- a/bin/dotbot
+++ b/bin/dotbot
@@ -7,8 +7,8 @@
# 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 python3 >/dev/null 2>&1 && exec python3 "$0" "$@"
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" "$@"
>&2 echo "error: cannot find python"
exit 1