mirror of
https://github.com/pyenv/pyenv.git
synced 2024-11-07 20:31:01 -05:00
Fixes pip-rehash to rehash if pip was called with a flag
`pip -v install foobar` or `pip -q install foobar` did not trigger a rehash before. Now it should have the same behaviour as `pip install foobar`.
This commit is contained in:
parent
30212f0054
commit
bbd8f2c01e
1 changed files with 9 additions and 3 deletions
|
@ -21,9 +21,15 @@ STATUS=0
|
||||||
|
|
||||||
# Run `pyenv-rehash` after a successful installation.
|
# Run `pyenv-rehash` after a successful installation.
|
||||||
if [ "$STATUS" == "0" ]; then
|
if [ "$STATUS" == "0" ]; then
|
||||||
case "$1" in
|
for piparg in "$@"; do
|
||||||
"install" | "uninstall" ) pyenv-rehash;;
|
case ${piparg} in
|
||||||
|
"install" | "uninstall" ) REHASH=0;;
|
||||||
esac
|
esac
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$REHASH" == "0" ]; then
|
||||||
|
pyenv-rehash
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exit "$STATUS"
|
exit "$STATUS"
|
||||||
|
|
Loading…
Reference in a new issue