浏览代码

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.
Marc Cornellà 5 年之前
父节点
当前提交
c23ab00990
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      tools/check_for_upgrade.sh

+ 3 - 1
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))