Skip to content

Commit

Permalink
[Fix] Remove $NVM_DIR trailing slash automatically, fix nvm-sh#1708
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterDaveHello committed Feb 21, 2018
1 parent f290ccf commit ca5c934
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions nvm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,9 @@ if [ -z "${NVM_DIR-}" ]; then
# shellcheck disable=SC1001
NVM_DIR="$(nvm_cd ${NVM_CD_FLAGS} "$(dirname "${NVM_SCRIPT_SOURCE:-$0}")" > /dev/null && \pwd)"
export NVM_DIR
elif echo "${NVM_DIR}" | nvm_grep -q "/$"; then
export NVM_DIR="${NVM_DIR%/}"
nvm_err "Warning: \$NVM_DIR should not have trailing space"
fi
unset NVM_SCRIPT_SOURCE 2> /dev/null

Expand Down

0 comments on commit ca5c934

Please sign in to comment.