Display error if pyenv activate was invoked as a command

This commit is contained in:
Yamashita Yuu
2014-01-25 19:14:58 +09:00
parent 1db565b67c
commit 503a51564e
4 changed files with 59 additions and 0 deletions

21
bin/pyenv-deactivate Executable file
View File

@@ -0,0 +1,21 @@
#!/usr/bin/env bash
#
# Summary: Deactivate virtual environment
#
# Usage: pyenv deactivate
#
# Deactivate a Python virtual environment.
set -e
[ -n "$PYENV_DEBUG" ] && set -x
{ printf "\x1B[31;1m"
echo
echo "Failed to deactivate virtualenv."
echo
echo "Perhaps pyenv-virtualenv has not been loaded into your shell properly."
echo "Please restart current shell and try again."
echo
printf "\x1B[0m"
} 1>&2
exit 1