-
-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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
Circular alias causes infinite loop #228
Comments
I just adccendentially did the same thing in nvm nvm install v5.10
nvm alias v5.10 default # oops
nvm alias default v5.10 It still seems to cause an infinte loop here. I get a the following when spawning a new terminal: [forkpty: Resource temporarily unavailable]
[Could not create a new process and open a pseudo-tty.] |
@emilbayes when I try that, default -> v5.10 (-> ∞)
v5.10 -> default (-> ∞) and |
I can't run |
So I ended up deleting both
Here's the output now: $ nvm alias v5.10 default
v5.10 -> default (-> v5.10.1)
$ nvm alias default v5.10
default -> v5.10 (-> ∞) So it seems that this is a non-issue now, I might have had some old state lingering? |
@emilbayes i'm not sure why you'd have an nvm dir outside |
If it helps anyone, this is how I fixed it: I created an infinite loop when creating an alias for version 10 as default, I didn't put the args in the right order: $ nvm alias 10 default # Wrong. This tells nvm that 10 is an alias of "default" But the final result is that there was an infinite loop whenever I tried to switch to version 10: The way I fixed it was to delete Not sure if there's a better way, but it worked :P |
@leftdevel theoretically |
Oddly enough I ran into this when using a workaround to fix the fact that using an lts name in the Using this in an Azure DevOps pipeline in a Bash step.
I ended up switching the VERSION_PATH invocation a bit, and maybe if I get some time I'll add a conditional that sets it differently depending on whether the
|
@spoelstraethan |
nvm unalias v5.10 |
Caution: Reproducing this may cause your PC to not boot anymore, since nvm.sh is executed inside .bashrc.
I wanted to alias
v0.10.5
withdefault
but wasn't sure about the parameter order. So I didnvm alias v0.10.5 default
. After I noticed that this was the wrong order, I didnvm alias default v0.10.5
. To confirm it workednvm ls
. From this moment on nvm was slowly filling all of my 8GB of RAM, forcing Ubuntu to kill several other processes. I had to boot into a root shell and disable/remove nvm in order to boot normally again.The text was updated successfully, but these errors were encountered: