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.
pull/76793/head
Pascal Höhnel 2 years ago committed by GitHub
parent a0f6747f07
commit 7cd94dd452
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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

Loading…
Cancel
Save