File size: 368 Bytes
e5fc29e |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
layout_pipenv() {
if [[ ! -f Pipfile ]]; then
echo 'No Pipfile found. Use `pipenv` to create a Pipfile first.' >&2
exit 2
fi
local VENV=$(pipenv --bare --venv 2>/dev/null)
if [[ -z $VENV || ! -d $VENV ]]; then
pipenv install --dev
fi
export VIRTUAL_ENV=$(pipenv --venv)
export PIPENV_ACTIVE=1
PATH_add "$VIRTUAL_ENV/bin"
}
layout pipenv
|