Install Node Version Manager without the source line

, posted

I like the Node Version Manager for, well, managing Node.js versions. When you install it, it adds a source to the bottom of your profile (effectively source I didn’t want it to do that during installation, though. I found myself pondering, “How do I disable that?”

It’s pretty easy, it turns out; you just tell it to redirect that source line elsewhere, like so:

curl -o-{{LATEST NVM VERSION HERE}}/ | PROFILE=/dev/null bash

The install script looks for a variable called “PROFILE” and adds the source line to that, so setting it to /dev/null adds the line to nothing!

You could also install it by cloning it from Git and doing it manually, but I prefer this because I can be sure I’m getting a stable version without doing a lot of commands.