Skip to content

Instantly share code, notes, and snippets.

@emperorcezar
Created April 27, 2017 11:16
Show Gist options
  • Select an option

  • Save emperorcezar/7050769c8f16d5fcfb4b2776c2f151b6 to your computer and use it in GitHub Desktop.

Select an option

Save emperorcezar/7050769c8f16d5fcfb4b2776c2f151b6 to your computer and use it in GitHub Desktop.
Leave a virtualenv from the parent shell
#/usr/bin/env bash
if [[ $VIRTUAL_ENV ]]; then
source $VIRTUAL_ENV/bin/activate
deactivate
fi
exec command mycommand.py "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment