rehash: preserve existing $PYENV_REHASH_TIMEOUT semantics

Try for that long no matter what the sleep step available is.
This commit is contained in:
Ville Skyttä 2021-01-09 10:21:11 +02:00
parent c0ea15226d
commit b938abdea1

View file

@ -40,7 +40,8 @@ if [ ! -w "$SHIM_PATH" ]; then
fi
unset acquired
for (( i=1; i<="${PYENV_REHASH_TIMEOUT:-60}"; i++ )); do
start=$SECONDS
while (( SECONDS <= start + ${PYENV_REHASH_TIMEOUT:-60} )); do
if acquire_lock 2>/dev/null; then
acquired=1
break