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.
This commit is contained in:
parent
8454021d66
commit
9a8d292681
1 changed files with 1 additions and 1 deletions
|
@ -7,8 +7,8 @@
|
||||||
# is useful because we don't know the name of the python binary.
|
# is useful because we don't know the name of the python binary.
|
||||||
|
|
||||||
''':' # begin python string; this line is interpreted by the shell as `:`
|
''':' # 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 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" "$@"
|
which python2 >/dev/null 2>&1 && exec python2 "$0" "$@"
|
||||||
>&2 echo "error: cannot find python"
|
>&2 echo "error: cannot find python"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
Loading…
Reference in a new issue