-
Notifications
You must be signed in to change notification settings - Fork 179
Persist choice from 'nvmw use [...]' #43
base: master
Are you sure you want to change the base?
Conversation
Is there any reason why you are modifying the system path (with the risk of breaking it by exceeding 1024 chars)? Persisting across sessions would work without setting the system path, right? |
Setting it in the System Path is what makes it persistent across sessions. Then, if we exceed 1024 chars, System Path won't be updated, it will stay how it was before we tried to modify it. So we're safe here. It will just follow the same behavior as before. |
Depends on what you mean with session. If you mean across different users' sessions then yes, otherwise the user path is enough. I wouldn't fiddle with the system path cause it can easily break (which just happened to me by using this PR). Great job here though. |
Oh sorry for your Path, what happened? I'll try to see if I can set it into the User Path instead. |
Nothing too bad, just exceeded 1024 chars and got trimmed at the end. On Fri, Feb 20, 2015 at 3:22 PM, Yoann Moinet [email protected]
|
I agree with you. I'll check this evening for the User Path. |
No worries, I'm grateful that you've been doing this actually! On Fri, Feb 20, 2015 at 3:27 PM, Yoann Moinet [email protected]
|
Ok, now it should persit into User Path instead. |
Not there yet unfortunately
|
How did you get this error? Can't reproduce it on my side. |
Not really, I just pulled-in your changes, got rid of the entries pointing On Sun, Feb 22, 2015 at 12:28 AM, Yoann Moinet [email protected]
|
Do you have Cygwin installed? |
I have Git for Windows installed and its bin folder in the path, which On Sun, Feb 22, 2015 at 12:44 AM, Yoann Moinet [email protected]
|
Let me know if that fix your problem. |
No wait, there must be something wrong in the script, it works the first C:\Users>nvmw use 0.12.0 C:\Users>nvmw use 0.12.0 On Sun, Feb 22, 2015 at 12:48 AM, Yoann Moinet [email protected]
|
Is it still applying correct changes into the user path?
|
Only the first time it is executed in a shell, the following times it fails if run again. Can you reproduce it? |
I can't reproduce it. |
As I said, only the first time it is run within a console session, the following times it fails |
Oh, sorry, I mis-understood your previous comment. |
So, I've tried with a clean install, a clean Path with no reference to Can you show me what you've installed with nvmw? I'm a little out of idea, it's quite hard to fix what I cannot reproduce, maybe we'll have to wait for someone else to test it, see if they can reproduce it. |
Ok thanks for the effort, I'll try to figure out why it fails and get back On Sun, Feb 22, 2015 at 5:43 PM, Yoann Moinet [email protected]
|
Ok I think I found the root cause, although I didn't look into the details yet. It has to do with what you mentioned earlier, issues with Git's find.exe. I have Git's bin directory in the path, and it basically seems to depend on the order of inclusion compared to the system directory. The reason why it worked the first time and then stopped working after the first |
It could definitely be the problem.
But I thought my latest commit would fix this by referencing 'find' via its
absolute path.
|
I didn't try the last commit, I didn't know there was one. I'll check it
|
Looks good to me now. Thanks a lot! On Sun, Feb 22, 2015 at 8:03 PM, Simone Busoli [email protected]
|
Thank you for taking the time to test it. |
@hakobera, do you have time to review this? |
This is going to be a nice addition! 👍
Isn't it even less; 260 char limit? We can't be too optimistic about Windows. 😉 |
Wouldn't it be simpler to create a "directory symbolic link" with the |
Did this PR ever go anywhere? Would be very handy to use. |
Thanks for your interest @dallonf. I'm using it with my own fork since the beginning. But it seemed handy only to me until you show up 😄 |
@yoannmoinet Sorry to bump this. I have checked your branch out and it works really well, but it looks like it's missing something. For example, here is the output of
Here is the output of
|
@Jameskmonger thank you for reporting this. |
With these changes
nvmw use [iojs|node]
will persist in system path accross cmd's sessions.As quickly discussed in #42.
Here are the steps :
.nvmw
pathsLet me now if this is useful to anyone else.