summaryrefslogtreecommitdiff
path: root/hacking/env-setup.fish
diff options
context:
space:
mode:
authorSam Doran <sdoran@redhat.com>2021-07-08 15:14:34 -0400
committerGitHub <noreply@github.com>2021-07-08 15:14:34 -0400
commit93e72c96f0339fba879bff9f99500fe55f0af446 (patch)
tree46ef714b6034b9c4dd4fe31ab2a001fafd52dc12 /hacking/env-setup.fish
parent3ba2243ba30e814b217abb5102969291a32f1708 (diff)
downloadansible-93e72c96f0339fba879bff9f99500fe55f0af446.zip
Update hacking `env_setup` to prefer Python 3 (#75213)
* env_setup - Prefer Python3 Prefer the 'python3' executable over 'python'. * Add shebang for syntax detection While the script isn't executable and we recommend sourcing it, having a shebang allows variuos text editors to detect that it is a shell script and apply proper syntax highlighting.
Diffstat (limited to 'hacking/env-setup.fish')
-rw-r--r--hacking/env-setup.fish6
1 files changed, 3 insertions, 3 deletions
diff --git a/hacking/env-setup.fish b/hacking/env-setup.fish
index 0ef92cdc65..94126cad40 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