diff --git a/nvm-exec b/nvm-exec index 83eb885ed0..0838f38281 100755 --- a/nvm-exec +++ b/nvm-exec @@ -1,6 +1,6 @@ #!/usr/bin/env bash -DIR="$(dirname $(realpath "${BASH_SOURCE[0]}"))" +DIR="$(dirname "$(realpath "${BASH_SOURCE[0]}")")" # shellcheck disable=SC1090,SC1091 \. "$DIR/nvm.sh" --no-use diff --git a/nvm.sh b/nvm.sh index f094a2018e..39a78055ef 100644 --- a/nvm.sh +++ b/nvm.sh @@ -3813,7 +3813,7 @@ nvm() { NVM_EXEC="${NVM_DIR}/nvm-exec" if [ ! -f "${NVM_EXEC}" ]; then - NVM_EXEC=`dirname ${BASH_SOURCE[0]-}`/nvm-exec + NVM_EXEC="$(dirname "${BASH_SOURCE[0]-}")/nvm-exec" fi NODE_VERSION="${VERSION}" "${NVM_EXEC}" "$@" ;;