mirror of
https://github.com/nvm-sh/nvm.git
synced 2025-09-26 19:41:34 +00:00
[Fix] Remove $NVM_DIR trailing slash automatically, fix #1708
This commit is contained in:

committed by
Jordan Harband

parent
42f11acce1
commit
685312d600
@@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -ex
|
||||
|
||||
die () { echo "$@" ; exit 1; }
|
||||
|
||||
export NVM_DIR_BASE="/tmp"
|
||||
export NVM_DIR="${NVM_DIR_BASE}/"
|
||||
|
||||
\. ../../nvm.sh
|
||||
|
||||
[ "${NVM_DIR}" = "${NVM_DIR_BASE}" ] || die 'nvm should remove the last trailing slash in "$NVM_DIR"'
|
||||
|
||||
export NVM_DIR="${NVM_DIR_BASE}//"
|
||||
|
||||
\. ../../nvm.sh
|
||||
|
||||
[ "${NVM_DIR}" = "${NVM_DIR_BASE}" ] || die 'nvm should remove all the last trailing slashes in "$NVM_DIR"'
|
Reference in New Issue
Block a user