瀏覽代碼

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"

Loading…
取消
儲存