From 7cd94dd45258c2bab8cd8f970fe2564372630b00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pascal=20H=C3=B6hnel?= <20238923+uupascal@users.noreply.github.com> Date: Tue, 18 Jan 2022 16:13:33 +0100 Subject: [PATCH] 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. --- hacking/env-setup | 4 ++-- 1 file 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