Update not working (error with upgrade.sh) #549

Closed
ashmoran opened this Issue Aug 14, 2011 · 24 comments

Projects

None yet
@ashmoran

I can't update Oh My Zsh from inside the shell. This is my shell session showing what goes wrong:

Last login: Sun Aug 14 09:42:19 on ttys002
[Oh My Zsh] Would you like to check for updates?
Type Y to update oh-my-zsh: y
/bin/sh: /tools/upgrade.sh: No such file or directory

Here is my .zshrc (zsh_app_switcher is just a simple function):

ZSH=$HOME/.oh-my-zsh
ZSH_THEME="robbyrussell"
plugins=(osx brew rvm gem bundler git rails3)
source $ZSH/oh-my-zsh.sh
export PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11/bin
source /Users/ashleymoran/.dotfiles/zsh_app_switcher
export EDITOR="mate -w"
export SVN_EDITOR="mate -w"
alias nano="nano -w"
export DARCS_EMAIL=ash.moran@patchspace.co.uk
if [[ -s /Users/ashleymoran/.rvm/scripts/rvm ]] ; then source /Users/ashleymoran/.rvm/scripts/rvm ; fi
@iernie
iernie commented Aug 16, 2011

I also have this problem. Seems that the variable $ZSH is empty within the upgrade script. Works if I hardcode the path to .oh-my-zsh in the tools/upgrade.sh script.

@jonand
jonand commented Aug 16, 2011

I also had troubles upgrading.

Manually executing git pull origin master worked.

Iernies trick worked. Seems like $ZSH isn't working inside upgrade.sh even though it is working otherwise.

@bbatsov
bbatsov commented Aug 16, 2011

Same problem here. Hopefully it will be fixed upstream soon.

@toolbear
Contributor

This was introduced by commit 1a673fc

--- templates/zshrc.zsh-template
+++ templates/zshrc.zsh-template
@@ -1,18 +1,18 @@
 # Path to your oh-my-zsh configuration.
-export ZSH=$HOME/.oh-my-zsh
+ZSH=$HOME/.oh-my-zsh
…

Temporary workaround, change your ~/.zshrc to export ZSH again:

export ZSH=$HOME/.oh-my-zsh
@toolbear toolbear added a commit to toolbear/oh-my-zsh that referenced this issue Aug 17, 2011
@toolbear toolbear Fix auto upgrade failure from non-exported ZSH env var
Fixes #549. Specify ZSH=$ZSH explicitly when invoking
the auto update scripts.
c113e88
@danishkhan

Thanks for the temporary workaround

@fabalca
fabalca commented Sep 14, 2011

worked as well.. thanks #toolbear

@trevor
Contributor
trevor commented Sep 17, 2011

+1

@chelmertz

+1

@levifig
levifig commented Oct 5, 2011

Folks: there's no new update since August 30 hence no updates coming with 'git pull origin master'. When there are updates, this issue will be fixed. Just be patient… :)

@Fitzsimmons

Why doesn't this issue warrant an update?

@kud
kud commented Oct 19, 2011

Hello,

I'm a bit lost, sorry. I've got this problem and I can't install oh-my-zsh because I've already installed it (makes sense).

So what should I do?

Thank you!

_kud

@toolbear
Contributor

@kud have you tried the temporary workaround #549 (comment)

@kud
kud commented Oct 19, 2011

I've pulled the git repo and added your line, seems ok. Cheers!

@trevor
Contributor
trevor commented Oct 19, 2011

does anyone know why this isn't being resolved? while not critical, it seems jarring and widespread.

@sunaku
Contributor
sunaku commented Oct 19, 2011

I think most people get by with a simple git pull --rebase origin master to upgrade their OMZ forks. In that light, I personally think this upgrade script is redundant / overkill. 👮

@toolbear
Contributor

@trevor it should be resolved. My pull request with a fix was accepted. However, once you've been bitten you have to fix your repo manually as @sunaku suggests. Alternatively you can do the workaround in my comment above. After that, auto update should work for you the next time.

@SethMilliken SethMilliken added a commit to SethMilliken/oh-my-zsh that referenced this issue Oct 27, 2011
@toolbear @SethMilliken toolbear + SethMilliken Fix auto upgrade failure from non-exported ZSH env var
Fixes #549. Specify ZSH=$ZSH explicitly when invoking
the auto update scripts.
1021ea4
@jojahner jojahner added a commit to jojahner/oh-my-zsh that referenced this issue Nov 5, 2011
@toolbear @jojahner toolbear + jojahner Fix auto upgrade failure from non-exported ZSH env var
Fixes #549. Specify ZSH=$ZSH explicitly when invoking
the auto update scripts.
220af91
@neaf neaf added a commit to neaf/oh-my-zsh that referenced this issue Nov 9, 2011
@toolbear @neaf toolbear + neaf Fix auto upgrade failure from non-exported ZSH env var
Fixes #549. Specify ZSH=$ZSH explicitly when invoking
the auto update scripts.
08975ca
@doug doug added a commit to doug/oh-my-zsh that referenced this issue Jan 23, 2012
@toolbear @doug toolbear + doug Fix auto upgrade failure from non-exported ZSH env var
Fixes #549. Specify ZSH=$ZSH explicitly when invoking
the auto update scripts.
89ee491
@jtimberman jtimberman added a commit to jtimberman/oh-my-zsh that referenced this issue Feb 5, 2012
@toolbear @jtimberman toolbear + jtimberman Fix auto upgrade failure from non-exported ZSH env var
Fixes #549. Specify ZSH=$ZSH explicitly when invoking
the auto update scripts.
a542890
@trabianmatt trabianmatt added a commit to trabianmatt/oh-my-zsh that referenced this issue Apr 1, 2013
@toolbear @trabianmatt toolbear + trabianmatt Fix auto upgrade failure from non-exported ZSH env var
Fixes #549. Specify ZSH=$ZSH explicitly when invoking
the auto update scripts.
8763670
@hajder
hajder commented Mar 7, 2014

Workaround is known for 3 years, why it this still an issue?

@robbyrussell
Owner

Closing per the advice of #2568.

@hajder
hajder commented Mar 14, 2014

This was still an issue after I installed oh-my-zsh for the first time in my life. It was 7 days ago (as of comment above).
Why this issue was closed if it's still there?

@trynity trynity pushed a commit to trynity/oh-my-zsh that referenced this issue Nov 29, 2014
@toolbear toolbear Fix auto upgrade failure from non-exported ZSH env var
Fixes #549. Specify ZSH=$ZSH explicitly when invoking
the auto update scripts.
472d58f
@wembernard

should be merged here.

@henryyang1993

old problems, but it works~ thank you! @toolbear

@abdennour

If you upgraded you MAC OS & you have XCode already installed, you should open XCode & accept agreements & install new components, then,, go back to terminal .. the issue will be resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment