replaced --no-error by --quiet

This commit is contained in:
Yamashita, Yuu
2015-11-06 17:33:40 +00:00
parent bf7e9ba59a
commit 8731e9bf14
3 changed files with 20 additions and 20 deletions

View File

@@ -14,7 +14,7 @@
set -e
[ -n "$PYENV_DEBUG" ] && set -x
unset NOERROR
unset QUIET
unset VERBOSE
while [ $# -gt 0 ]; do
@@ -24,8 +24,8 @@ while [ $# -gt 0 ]; do
echo --unset
exec pyenv-virtualenvs --bare
;;
"--no-error" )
NOERROR=1
"--no-error" | "--quiet" )
QUIET=1
;;
"--unset" )
echo "pyenv deactivate"
@@ -57,14 +57,14 @@ if [ -z "${PYENV_VIRTUALENV_INIT}" ]; then
fi
if [ "${#versions[@]}" -gt 1 ]; then
[ -n "$NOERROR" ] || echo "pyenv-virtualenv: cannot activate multiple versions at once: ${versions[@]}" 1>&2
[ -n "$QUIET" ] || echo "pyenv-virtualenv: cannot activate multiple versions at once: ${versions[@]}" 1>&2
echo "false"
exit 1
fi
if pyenv-prefix "${versions}" 1>/dev/null 2>&1; then
if ! pyenv-virtualenv-prefix "${versions}" 1>/dev/null 2>&1; then
[ -n "$NOERROR" ] || echo "pyenv-virtualenv: version \`${versions}' is not a virtualenv" 1>&2
[ -n "$QUIET" ] || echo "pyenv-virtualenv: version \`${versions}' is not a virtualenv" 1>&2
echo "false"
exit 1
fi
@@ -72,7 +72,7 @@ else
version="$(pyenv-version-name)"
versions="${version%/envs/*}/envs/${versions}"
if ! pyenv-virtualenv-prefix "${versions}" 1>/dev/null 2>&1; then
[ -n "$NOERROR" ] || echo "pyenv-virtualenv: version \`${versions}' is not an environment of anaconda/miniconda" 1>&2
[ -n "$QUIET" ] || echo "pyenv-virtualenv: version \`${versions}' is not an environment of anaconda/miniconda" 1>&2
echo "false"
exit 1
fi