Unverified Commit c23ab009 authored by Marc Cornellà's avatar Marc Cornellà Committed by GitHub
Browse files

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.
parent a85ce89a
...@@ -34,7 +34,9 @@ if mkdir "$ZSH/log/update.lock" 2>/dev/null; then ...@@ -34,7 +34,9 @@ if mkdir "$ZSH/log/update.lock" 2>/dev/null; then
. ${ZSH_CACHE_DIR}/.zsh-update . ${ZSH_CACHE_DIR}/.zsh-update
if [[ -z "$LAST_EPOCH" ]]; then if [[ -z "$LAST_EPOCH" ]]; then
_update_zsh_update && return 0 _update_zsh_update
rmdir $ZSH/log/update.lock # TODO: fix later
return 0
fi fi
epoch_diff=$(($(_current_epoch) - $LAST_EPOCH)) epoch_diff=$(($(_current_epoch) - $LAST_EPOCH))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment