You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
429 B

  1. #!/usr/bin/env bash
  2. #
  3. # Summary: Deactivate virtual environment
  4. #
  5. # Usage: pyenv deactivate
  6. #
  7. # Deactivate a Python virtual environment.
  8. set -e
  9. [ -n "$PYENV_DEBUG" ] && set -x
  10. { printf "\x1B[31;1m"
  11. echo
  12. echo "Failed to deactivate virtualenv."
  13. echo
  14. echo "Perhaps pyenv-virtualenv has not been loaded into your shell properly."
  15. echo "Please restart current shell and try again."
  16. echo
  17. printf "\x1B[0m"
  18. } 1>&2
  19. exit 1