Skip to content

Instantly share code, notes, and snippets.

@pmclanahan
Forked from jacobian/pip_condom.sh
Created October 15, 2009 14:36
Show Gist options
  • Save pmclanahan/210986 to your computer and use it in GitHub Desktop.
Save pmclanahan/210986 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