mirror of
https://github.com/pyenv/pyenv.git
synced 2024-11-21 20:47:00 -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.
|
||||
if [ "$STATUS" == "0" ]; then
|
||||
case "$1" in
|
||||
"install" | "uninstall" ) pyenv-rehash;;
|
||||
for piparg in "$@"; do
|
||||
case ${piparg} in
|
||||
"install" | "uninstall" ) REHASH=0;;
|
||||
esac
|
||||
done
|
||||
fi
|
||||
|
||||
if [ "$REHASH" == "0" ]; then
|
||||
pyenv-rehash
|
||||
fi
|
||||
|
||||
exit "$STATUS"
|
||||
|
|
Loading…
Reference in a new issue