summaryrefslogtreecommitdiff
path: root/tools/check_for_upgrade.sh
diff options
context:
space:
mode:
authorMarc Cornellà <marc.cornella@live.com>2019-04-07 20:39:25 +0200
committerGitHub <noreply@github.com>2019-04-07 20:39:25 +0200
commitc23ab00990c8528a3334d178b9ec9135385cc99f (patch)
treebdd6b6438d85d19466dbe1f2b6893a3640c410ae /tools/check_for_upgrade.sh
parenta85ce89a3dc7fc63b4e8518a923f9c718561eb0b (diff)
downloadzsh-c23ab00990c8528a3334d178b9ec9135385cc99f.tar.gz
zsh-c23ab00990c8528a3334d178b9ec9135385cc99f.tar.bz2
zsh-c23ab00990c8528a3334d178b9ec9135385cc99f.zip
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.
Diffstat (limited to 'tools/check_for_upgrade.sh')
-rw-r--r--tools/check_for_upgrade.sh4
1 files changed, 3 insertions, 1 deletions
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))