summaryrefslogtreecommitdiffstats
path: root/hacking/env-setup
diff options
context:
space:
mode:
authorSam Doran <sdoran@redhat.com>2021-07-08 21:14:34 +0200
committerGitHub <noreply@github.com>2021-07-08 21:14:34 +0200
commit93e72c96f0339fba879bff9f99500fe55f0af446 (patch)
tree46ef714b6034b9c4dd4fe31ab2a001fafd52dc12 /hacking/env-setup
parentReplace self.module by my_module (#75196) (diff)
downloadansible-93e72c96f0339fba879bff9f99500fe55f0af446.tar.xz
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')
-rw-r--r--hacking/env-setup4
1 files changed, 2 insertions, 2 deletions
diff --git a/hacking/env-setup b/hacking/env-setup
index fc0648751a..c9fbdbd55f 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