-
-
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
Implements nvm which #583
Merged
Merged
Implements nvm which #583
Changes from 7 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
382c3aa
implements nvm which
danielb2 b63042b
forgot to append bin
danielb2 ee520ab
adding some tests for nvm which
danielb2 8b25457
remove redundant lines from test file
danielb2 c9a53fe
include nvm which in documentaiton
danielb2 0c33fd2
change to use default behavior for which
danielb2 234b925
style and remove nvm deactivate in nvm which
danielb2 a1c0c34
fix to proper echo of nvm which. Checkin test which had been left out
danielb2 7805492
merge with master
danielb2 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
test/fast/Listing paths/Running "nvm which 0.0.2" should display only version 0.0.2.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/sh | ||
|
||
mkdir ../../../v0.0.2 | ||
mkdir ../../../v0.0.20 | ||
|
||
. ../../../nvm.sh | ||
|
||
die () { echo $@ ; exit 1; } | ||
|
||
# The result should contain only the appropriate version numbers. | ||
|
||
nvm which 0.0.2 | grep "$NVM_DIR/v0.0.2/bin" > /dev/null | ||
if [ $? -ne 0 ]; then | ||
die '"nvm which 0.0.2" did not contain the correct path' | ||
fi | ||
|
||
nvm which 0.0.20 | grep "$NVM_DIR/v0.0.20/bin" > /dev/null | ||
if [ $? -ne 0 ]; then | ||
die '"nvm which 0.0.2" did not contain the correct path' | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
rmdir ../../../v0.0.2 >/dev/null 2>&1 | ||
rmdir ../../../v0.0.20 >/dev/null 2>&1 |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Per the previous comments - with a system node of 0.10.33,
nvm use 0.9 && nvm which system
would return0.9.x
, unless as the subshell command you have"$(nvm use system && dirname "$(which node)")"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, thanks