mirror of
https://github.com/pyenv/pyenv-virtualenv.git
synced 2025-11-15 06:53:52 -05:00
Reject creating a virtualenv named system (yyuu/pyenv#475)
This commit is contained in:
@@ -273,6 +273,11 @@ if [ -z "${VERSION_NAME}" ] || [ -z "${VIRTUALENV_NAME}" ]; then
|
||||
usage 1
|
||||
fi
|
||||
|
||||
if [[ "$VIRTUALENV_NAME" == "system" ]]; then
|
||||
echo "pyenv-virtualenv: \`system' is not allowed as virtualenv name." 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$VIRTUALENV_NAME" != "${VIRTUALENV_NAME%[[:space:]]*}" ]; then
|
||||
echo "pyenv-virtualenv: no whitespace allowed in virtualenv name." 1>&2
|
||||
exit 1
|
||||
|
||||
Reference in New Issue
Block a user