New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not force PATH in the installer #1359
Conversation
The installer forced PATH - this prevents PATH dynamically set by system, also forces any temporary user PATH that was set during installation to be recorded and used on every shell start. It should be users conscious choice to manipulate PATH, a lot of users is not aware of this and do not even know if this good or not. If users need to add something to PATH they should do it by adding it not overwriting system detected PATH: PATH="$PATH:/user/custom/path" or: path+=( "/user/custom/path" )
@mpapis I've not heard many people complain about this. The purpose behind retaining what was currently in the $PATH is that we're trying to avoid people having shit break when they're installing OhMyZsh for the first time (as we're assuming you're someone who is working with bash... and if you lose your PATH and/or aren't that shell savvy, you'll be confused why things aren't working) Someone with more know can still modify this after-the-fact, no? |
Happy to discuss this further, but am not convinced yet (as we're assuming a PATH was already defined to their liking and we're just retaining that) |
@robbyrussell it works as long you have static environment, but for dynamic environment's it's a headache, you predefine the Does this forcing PATH give you any advantage - I do not understand how hardcoding Finally a script installed in |
one more, the users that have issues with it explain it:
I need to explain it to every of them from scratch ... at least now I can point them to this ticket |
@robbyrussell so the issue rvm/rvm#1351 is a real life example of the problem caused by forcing |
@robbyrussell ping - so this does not get lost in history |
following @postmodern advice posting steps to reproduce the problem: $ rvm use 1.9.3 --default
$ rvm use 1.8.7
$ curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | sh open new terminal: $ echo $PATH
/path/to/ruby-1.8.7/bin:...
$ echo $GEM_PATH
/path/to/ruby-1.9.3:... as you can see they are inconsistent because the so after installing OH-MY-ZSH it is hard coded and no other tool can add itself to the |
a regular reminder to reopen this - just had another user with the same problem, removing the hard coded |
I've hit this issue as well. So has @wycats. |
Confirm. I'm surprised you don't consider this a serious issue. It's driving me crazy 😦 I have added |
I am facing the same issue here =( |
+1 |
This breaks my rvm as well. Removing hard-coded |
I've had this problem as well, each Ubuntu server I spin up and install rvm on I have to change the Note that:
will NOT fix the issue, it must be the former. Here is my path after both settings: |
@robbyrussell I'm thinking to submit a patch for this that will grep the user's existing |
Ran into this problem as well on an RVM installation on OS X mavericks |
+1 |
Please see pull request #2589 and see if it works for you. |
I'm getting this error on a fresh os x mavericks running oh-my-zsh:
What do I have to change in what file? I don't want my rvm breaking |
@jasonshark In your case it looks like you can just remove that line 54 from your .zshrc. None of the paths in that error message are custom additions, so it's basically just doing the expansion of (There's also a proposed patch to the oh-my-zsh installer in #2589 if you want to test that branch for us.) |
ok cool. commented out line 54 in |
I commented on this over at #2589 and was pointed here. I don't understand @robbyrussell's reasons for not setting the path dynamically. I spent a couple hours trying to figure out what was wrong with my rbenv install before I stumbled onto this. As @mpapis said, for those of us with dynamic environments this is a huge pain. It seems wrong to comment out the path in the @robbyrussell, can you please elaborate a little more on why you won't consider this approach? Thanks in advance! |
Looks like I am running into this issue while using RVM. Any update on a fix? |
Seeing as this is not getting fixed, uninstall oh-my-zsh till it actually works.... |
You don't need to uninstall Oh My Zsh. Just correct the You can also avoid the problem by doing a manual installation by cloning the OMZ repo to |
yea, or the project could you know....be fixed and support everything as it should be. |
+1 |
This just fixed my rails after hours of digging. +1 |
+1. |
should I rebase? |
No need, sorry, I just reopened this again to signal that it's not solved yet. |
+1 |
1 similar comment
+1 |
This one did it for me |
|
Well OMZ is not changing it. I changed the order of paths in the file like it says here:
Not sure how it relates to the issue honestly but the issue is gone. |
@milos-v Right. I'm saying you shouldn't have had to do that in the first place. And also that, even if that act worked for you, OMZ shouldn't do the same thing. But moreover, the problem in this issue report occurs when you: |
Works for me. Thanks |
+1 |
+1 found this as a workaround https://github.com/postmodern/chruby |
This problem is to much trouble. uninstalling as it appears a fix will not be made. I should not have to manually edit ohmyzsh to get my path to work with it. |
You should comment the rvm related lines in ~/.zshrc, it works for me. |
This was fixed in #4925. I don't know why I kept it open so long. |
The installer forced PATH - this prevents PATH dynamically set by system, also forces any temporary user PATH that was set during installation to be recorded and used on every shell start.
It should be users conscious choice to manipulate PATH, a lot of users is not aware of this and do not even know if this good or not.
If users need to add something to PATH they should do it by adding it not overwriting system detected PATH:
or: