diff --git a/nvm.sh b/nvm.sh index 2053719..a594381 100644 --- a/nvm.sh +++ b/nvm.sh @@ -6,7 +6,7 @@ # with much bash help from Matthew Ranney # Auto detect the NVM_DIR using magic bash 3.x stuff -export NVM_DIR=$(dirname ${BASH_ARGV[0]}) +export NVM_DIR=$(cd $(dirname ${BASH_SOURCE[0]:-$0}); pwd) nvm() {