5ffc0d036c587741fd25092e7809dad2b00b3677

Author
Ye Shu <chshu@protonmail.ch>
Committer
GitHub <noreply@github.com>
Date

Message

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

Diff

 1diff --git a/oh-my-zsh.sh b/oh-my-zsh.sh
 2index 741bad5107484aed960fd6aafa80654bbcd1affe..5b057256d9890bc5a50f913e430666fdf0238262 100644
 3--- a/oh-my-zsh.sh
 4+++ b/oh-my-zsh.sh
 5@@ -5,7 +5,9 @@ if [[ -z "$ZSH_CACHE_DIR" ]]; then
 6 fi
 7 
 8 # Check for updates on initial load...
 9-source $ZSH/tools/check_for_upgrade.sh
10+if [ "$DISABLE_AUTO_UPDATE" != "true" ]; then
11+  source $ZSH/tools/check_for_upgrade.sh
12+fi
13 
14 # Initializes Oh My Zsh
15