Skip to content

Instantly share code, notes, and snippets.

@jacobian
Created October 15, 2009 13:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save jacobian/210933 to your computer and use it in GitHub Desktop.
Save jacobian/210933 to your computer and use it in GitHub Desktop.
# Prevent pip from doing anything unless you're inside an activated virtualenv.
PIP=/usr/local/bin/pip
function pip {
if [ "x$VIRTUAL_ENV" = 'x' ]; then
echo "No virtualenv activated; bailing."
else
$PIP -E `basename $VIRTUAL_ENV` "$@"
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment