Skip to content
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

Fix which to use conventional direct path to program #597

Merged
merged 3 commits into from
Dec 19, 2014

Conversation

danielb2
Copy link
Contributor

Also fixes nvm which system so it doesn't echo anything extra.

@@ -965,7 +965,7 @@ nvm() {

if [ "_$VERSION" = '_system' ]; then
if nvm_has_system_node >/dev/null 2>&1; then
echo $(nvm use system && echo dirname $(which node))
echo $(nvm deactivate > /dev/null 2>&1 && echo $(which node))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer nvm use system >/dev/null 2>&1 rather than deactivate here, but suppressing stdout is a good change.

Also, do you need the echo $(which node) or can it just be which node?

@ljharb
Copy link
Member

ljharb commented Dec 19, 2014

Also, can you rebase this on top of latest master, so there's no merge commits dirtying the log?

@ljharb
Copy link
Member

ljharb commented Dec 19, 2014

Awesome, thanks!

ljharb added a commit that referenced this pull request Dec 19, 2014
Fix `nvm which` to use conventional direct path to program, like system `which`
@ljharb ljharb merged commit 0ac2c78 into nvm-sh:master Dec 19, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants