1
0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-11-25 09:41:20 +08:00

upgrade: fix lock-out on first upgrade check

This early return made it so the lock wasn't removed, therefore locking out
the upgrade script from ever entering the upgrade routine.

Fixes #6138 

Note: the logic needs some rework.
This commit is contained in:
Marc Cornellà 2019-04-07 20:39:25 +02:00 committed by GitHub
parent a85ce89a3d
commit c23ab00990
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -34,7 +34,9 @@ if mkdir "$ZSH/log/update.lock" 2>/dev/null; then
. ${ZSH_CACHE_DIR}/.zsh-update
if [[ -z "$LAST_EPOCH" ]]; then
_update_zsh_update && return 0
_update_zsh_update
rmdir $ZSH/log/update.lock # TODO: fix later
return 0
fi
epoch_diff=$(($(_current_epoch) - $LAST_EPOCH))