From c23ab00990c8528a3334d178b9ec9135385cc99f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= Date: Sun, 7 Apr 2019 20:39:25 +0200 Subject: [PATCH] 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. --- tools/check_for_upgrade.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/check_for_upgrade.sh b/tools/check_for_upgrade.sh index 05b31e8d4..c8dedcf77 100644 --- a/tools/check_for_upgrade.sh +++ b/tools/check_for_upgrade.sh @@ -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))