Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #395 from vguerci/upgrade-before-init

Upgrade before init
  • Loading branch information...
commit e8bd400bffc51c83e0ef6671ecb5f364dc2f5065 2 parents 0c41b1c + 7c94745
@robbyrussell authored
Showing with 8 additions and 10 deletions.
  1. +8 −9 oh-my-zsh.sh
  2. +0 −1  tools/upgrade.sh
View
17 oh-my-zsh.sh
@@ -1,3 +1,11 @@
+# Check for updates on initial load...
+if [ "$DISABLE_AUTO_UPDATE" = "true" ]
+then
+ return
@sunaku
sunaku added a note

I think this is a bug. It prematurely stops further processing of the rest of this file (which sets up the OMZ environment) and thereby leaves you in a broken ZSH session where none of your plugins are loaded and there are weird errors like compdef is undefined.

@sunaku
sunaku added a note

I was correct about this being a bug. @mkomitee kindly submitted this pull request to fix the issue.

@mkomitee
mkomitee added a note

Indeed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+else
+ /usr/bin/env zsh $ZSH/tools/check_for_upgrade.sh
+fi
+
# Initializes Oh My Zsh
# add a function path
@@ -28,7 +36,6 @@ done
for config_file ($ZSH/custom/*.zsh) source $config_file
# Load the theme
-# Check for updates on initial load...
if [ "$ZSH_THEME" = "random" ]
then
themes=($ZSH/themes/*zsh-theme)
@@ -41,11 +48,3 @@ else
source "$ZSH/themes/$ZSH_THEME.zsh-theme"
fi
-
-# Check for updates on initial load...
-if [ "$DISABLE_AUTO_UPDATE" = "true" ]
-then
- return
-else
- /usr/bin/env zsh $ZSH/tools/check_for_upgrade.sh
-fi
View
1  tools/upgrade.sh
@@ -8,6 +8,5 @@ echo "\033[0;32m"'/ /_/ / / / / / / / / / / /_/ / / /_(__ ) / / / '"\033[0m
echo "\033[0;32m"'\____/_/ /_/ /_/ /_/ /_/\__, / /___/____/_/ /_/ '"\033[0m"
echo "\033[0;32m"' /____/ '"\033[0m"
echo "\033[0;34mHooray! Oh My Zsh has been updated and/or is at the current version.\033[0m"
-echo "\033[0;34mAny new updates will be reflected when you start your next terminal session.\033[0m"
echo "\033[0;34mTo keep up on the latest, be sure to follow Oh My Zsh on twitter: \033[1mhttp://twitter.com/ohmyzsh\033[0m"
cd $current_path
Please sign in to comment.
Something went wrong with that request. Please try again.