Skip to content

Instantly share code, notes, and snippets.

View henriklied's full-sized avatar

Henrik Lied henriklied

View GitHub Profile
# 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
}