Fix `nvm_strip_path` for >= v0.12.0 node, and all io.js versions.
parent
39a75e616d
commit
dbeeb683da
8
nvm.sh
8
nvm.sh
|
@ -264,7 +264,13 @@ nvm_num_version_groups() {
|
||||||
}
|
}
|
||||||
|
|
||||||
nvm_strip_path() {
|
nvm_strip_path() {
|
||||||
echo "$1" | command sed -e "s#$NVM_DIR/[^/]*$2[^:]*:##g" -e "s#:$NVM_DIR/[^/]*$2[^:]*##g" -e "s#$NVM_DIR/[^/]*$2[^:]*##g"
|
echo "$1" | command sed \
|
||||||
|
-e "s#$NVM_DIR/[^/]*$2[^:]*:##g" \
|
||||||
|
-e "s#:$NVM_DIR/[^/]*$2[^:]*##g" \
|
||||||
|
-e "s#$NVM_DIR/[^/]*$2[^:]*##g" \
|
||||||
|
-e "s#$NVM_DIR/versions/[^/]*/[^/]*$2[^:]*:##g" \
|
||||||
|
-e "s#:$NVM_DIR/versions/[^/]*/[^/]*$2[^:]*##g" \
|
||||||
|
-e "s#$NVM_DIR/versions/[^/]*/[^/]*$2[^:]*##g"
|
||||||
}
|
}
|
||||||
|
|
||||||
nvm_prepend_path() {
|
nvm_prepend_path() {
|
||||||
|
|
|
@ -4,7 +4,7 @@ die () { echo $@ ; exit 1; }
|
||||||
|
|
||||||
. ../../../nvm.sh
|
. ../../../nvm.sh
|
||||||
|
|
||||||
TEST_PATH=$NVM_DIR/v0.10.5/bin:/usr/bin:$NVM_DIR/v0.11.5/bin:$NVM_DIR/v0.9.5/bin:/usr/local/bin:$NVM_DIR/v0.2.5/bin
|
TEST_PATH=$NVM_DIR/v0.10.5/bin:/usr/bin:$NVM_DIR/v0.11.5/bin:$NVM_DIR/v0.9.5/bin:/usr/local/bin:$NVM_DIR/v0.2.5/bin:$NVM_DIR/versions/node/v0.12.0/bin:$NVM_DIR/versions/io.js/v1.0.0/bin
|
||||||
|
|
||||||
STRIPPED_PATH=`nvm_strip_path "$TEST_PATH" "/bin"`
|
STRIPPED_PATH=`nvm_strip_path "$TEST_PATH" "/bin"`
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue