mirror of
https://github.com/pyenv/pyenv-virtualenv.git
synced 2025-11-17 16:03:42 -05:00
Do not allow whitespace in VIRTUALENV_NAME
While this could work in general, it fails in the end, because whitespace is not allowed/supported in the shebang line with the scripts in the created virtualenv.
This commit is contained in:
@@ -297,6 +297,11 @@ if [ -z "${VERSION_NAME}" ] || [ -z "${VIRTUALENV_NAME}" ]; then
|
||||
usage 1
|
||||
fi
|
||||
|
||||
if [ "$VIRTUALENV_NAME" != "${VIRTUALENV_NAME%[[:space:]]*}" ]; then
|
||||
echo "pyenv-virtualenv: no whitespace allowed in virtualenv name." 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Set VERSION_NAME as default version in this script
|
||||
export PYENV_VERSION="${VERSION_NAME}"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user