浏览代码

init: don't run update check if DISABLE_AUTO_UPDATE (#9040)

skip the update check at initialization if DISABLE_AUTO_UPDATE is set to true
Ye Shu 3 年之前
父节点
当前提交
5ffc0d036c
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      oh-my-zsh.sh

+ 3 - 1
oh-my-zsh.sh

@@ -5,7 +5,9 @@ if [[ -z "$ZSH_CACHE_DIR" ]]; then
 fi
 
 # Check for updates on initial load...
-source $ZSH/tools/check_for_upgrade.sh
+if [ "$DISABLE_AUTO_UPDATE" != "true" ]; then
+  source $ZSH/tools/check_for_upgrade.sh
+fi
 
 # Initializes Oh My Zsh