diff options
author | Sam Doran <sdoran@redhat.com> | 2021-07-08 15:14:34 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-08 15:14:34 -0400 |
commit | 93e72c96f0339fba879bff9f99500fe55f0af446 (patch) | |
tree | 46ef714b6034b9c4dd4fe31ab2a001fafd52dc12 /hacking/env-setup.fish | |
parent | 3ba2243ba30e814b217abb5102969291a32f1708 (diff) | |
download | ansible-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.fish | 6 |
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 |