You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I cloned the nvm repository into a directory, then sourced nvm.sh via a symbolic link to that directory.
This causes nvm to error out due to incorrect "contains path" logic:
$ nvm use v5.1.0
nvm is not compatible with the npm config "prefix" option: currently set to "/opt/src/nvm/versions/node/v5.1.0"
Run `npm config delete prefix` or `nvm use --delete-prefix v5.1.0` to unset it.
Here's one possible fix:
diff --git a/nvm.sh b/nvm.sh
index b4e871f..7cd1e1d 100755
--- a/nvm.sh
+++ b/nvm.sh
@@ -98,9 +98,9 @@ fi
nvm_tree_contains_path() {
local tree
- tree="$1"
+ tree="$(readlink -f "$1")"
local node_path
- node_path="$2"
+ node_path="$(readlink -f "$2")"
if [ "@$tree@" = "@@" ] || [ "@$node_path@" = "@@" ]; then
>&2 echo "both the tree and the node path are required"
The text was updated successfully, but these errors were encountered:
This is a duplicate of #617 - for now, $NVM_DIR can not be a symlink.
I'm relatively sure readlink in that fashion is not POSIX - meaning, it won't work on all of bash, zsh, dash, sh, and ksh. PRs welcome if you can convince me that it is!
I cloned the nvm repository into a directory, then sourced nvm.sh via a symbolic link to that directory.
This causes nvm to error out due to incorrect "contains path" logic:
Here's one possible fix:
The text was updated successfully, but these errors were encountered: