--active flag #80

wants to merge 1 commit into


None yet
2 participants

Hey TJ,

Completely up to you mate, but I've added this into my local version of the n script so I can include the n specific bin folder into my path environment in console init scripts, like so:

export NODE_VERSION=`/usr/local/bin/n --active`
export PATH=/usr/local/n/versions/$NODE_VERSION/bin:$PATH

I know it really doesn't do much, as once I understood what you were doing with n it was simple enough to replicate without using the n --active flag:

export NODE_VERSION=`/usr/local/bin/node --version`
export PATH=/usr/local/n/versions/${NODE_VERSION#v}/bin:$PATH



tj commented Jul 24, 2012

how does that differ from node --version?

After leaving this a day TJ, I agree, it's not different enough to warrant a change to the script. I'm better off writing a quick gist or something to demonstrate how to use the ${NODE_VERSION#v} as you did within the n script to update the binary path to suit the current version of n...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment