Просмотр исходного кода

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`.
pull/907/head
Lars Fronius 9 лет назад
committed by GitHub
Родитель
Сommit
bbd8f2c01e
1 измененных файлов: 9 добавлений и 3 удалений
  1. +9
    -3
      pyenv.d/exec/pip-rehash/pip

+ 9
- 3
pyenv.d/exec/pip-rehash/pip Просмотреть файл

@ -21,9 +21,15 @@ STATUS=0
# Run `pyenv-rehash` after a successful installation.
if [ "$STATUS" == "0" ]; then
case "$1" in
"install" | "uninstall" ) pyenv-rehash;;
esac
for piparg in "$@"; do
case ${piparg} in
"install" | "uninstall" ) REHASH=0;;
esac
done
fi
if [ "$REHASH" == "0" ]; then
pyenv-rehash
fi
exit "$STATUS"

Загрузка…
Отмена
Сохранить