Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ansible/ansible.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPascal Höhnel <20238923+uupascal@users.noreply.github.com>2022-01-18 18:13:33 +0300
committerGitHub <noreply@github.com>2022-01-18 18:13:33 +0300
commit7cd94dd45258c2bab8cd8f970fe2564372630b00 (patch)
treeb8853a6f18ce362c487ddbf876c201ce1f5bd847 /hacking
parenta0f6747f077898a97a0d8f9849e11377a58d7117 (diff)
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')
-rw-r--r--hacking/env-setup4
1 files changed, 2 insertions, 2 deletions
diff --git a/hacking/env-setup b/hacking/env-setup
index 4741423b4d3..b02c7e6e07c 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