Преглед на файлове

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
родител
ревизия
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"

Зареждане…
Отказ
Запис