diff --git a/hacking/env-setup b/hacking/env-setup index fc0648751a0..c9fbdbd55f8 100644 --- a/hacking/env-setup +++ b/hacking/env-setup @@ -1,4 +1,4 @@ - +#!/bin/sh # usage: source hacking/env-setup [-q] # modifies environment for running Ansible from checkout @@ -22,7 +22,7 @@ prepend_path() PYTHONPATH=${PYTHONPATH-""} PATH=${PATH-""} MANPATH=${MANPATH-$(manpath)} -PYTHON=$(command -v python || command -v python3) +PYTHON=$(command -v python3 || command -v python) PYTHON_BIN=${PYTHON_BIN-$PYTHON} verbosity=${1-info} # Defaults to `info' if unspecified diff --git a/hacking/env-setup.fish b/hacking/env-setup.fish index 0ef92cdc651..94126cad406 100644 --- a/hacking/env-setup.fish +++ b/hacking/env-setup.fish @@ -47,10 +47,10 @@ end # Set PYTHON_BIN if not set -q PYTHON_BIN - if test (which python) - set -gx PYTHON_BIN (which python) - else if test (which python3) + if test (which python3) set -gx PYTHON_BIN (which python3) + else if test (which python) + set -gx PYTHON_BIN (which python) else echo "No valid Python found" exit 1