diff options
author | Pascal Höhnel <20238923+uupascal@users.noreply.github.com> | 2022-01-18 16:13:33 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-18 16:13:33 +0100 |
commit | 7cd94dd45258c2bab8cd8f970fe2564372630b00 (patch) | |
tree | b8853a6f18ce362c487ddbf876c201ce1f5bd847 /hacking/env-setup | |
parent | a0f6747f077898a97a0d8f9849e11377a58d7117 (diff) | |
download | ansible-7cd94dd45258c2bab8cd8f970fe2564372630b00.tar.gz |
Fix unsafe handling of variable PYTHON_BIN (#76767)
The previous state lead to errors, when cloning the repo to a path with spaces in it.
Diffstat (limited to 'hacking/env-setup')
-rw-r--r-- | hacking/env-setup | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/hacking/env-setup b/hacking/env-setup index 4741423b4d..b02c7e6e07 100644 --- a/hacking/env-setup +++ b/hacking/env-setup @@ -44,7 +44,7 @@ else fi # The below is an alternative to readlink -fn which doesn't exist on macOS # Source: http://stackoverflow.com/a/1678636 -FULL_PATH=$($PYTHON_BIN -c "import os; print(os.path.realpath('$HACKING_DIR'))") +FULL_PATH=$("$PYTHON_BIN" -c "import os; print(os.path.realpath('$HACKING_DIR'))") export ANSIBLE_HOME="$(dirname "$FULL_PATH")" PREFIX_PYTHONPATH="$ANSIBLE_HOME/lib" @@ -70,7 +70,7 @@ gen_egg_info() # see https://github.com/ansible/ansible/pull/11967 \rm -rf "$PREFIX_PYTHONPATH"/ansible*.egg-info fi - $PYTHON_BIN setup.py egg_info + "$PYTHON_BIN" setup.py egg_info } if [ "$ANSIBLE_HOME" != "$PWD" ] ; then |