Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Do not fail .bashrc if nvm is not installed #1805
Currently installing nvm might add something like this into your
This will unfortunately cause bash to spawn with a return-code of 1.
My fix will solve this issue and make sure that it will work if those files exist, and that it won't throw an error should they not exist:
@ljharb nope I do not explicitly do
I am running a pretty recent bash version on macOS, so maybe something changed:
Would be interesting to know if it really has been working for years, or just went unnoticed because in the majority of cases if that line were in your
My question is, why does it matter, exactly? The OS is what sources your profile files, and a nonzero return doesn't seem to cause any problems that I can see (other than my prompt, which shows the exit code, showing a
Exactly that is the reason :)
I suppose there is no big reason, the PR would make things cleaner though? And might help someone else who stumbled on exactly this issue (like me) - I mean at the end the current code is not readable, as I and you stumbled on wrong assumption of the outcome...