From fd1f2cdf661691b8fb8739a7250d719d1fcbd00f Mon Sep 17 00:00:00 2001 From: Brock Angelo Date: Sat, 25 Oct 2014 13:55:20 -0500 Subject: [PATCH 1/2] use `command -p pwd` to use the system default pwd --- nvm.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nvm.sh b/nvm.sh index aafb13a..a2ca6b5 100644 --- a/nvm.sh +++ b/nvm.sh @@ -43,7 +43,7 @@ if [ -z "$NVM_DIR" ]; then if [ -n "$BASH_SOURCE" ]; then NVM_SCRIPT_SOURCE="${BASH_SOURCE[0]}" fi - export NVM_DIR=$(cd $NVM_CD_FLAGS $(dirname "${NVM_SCRIPT_SOURCE:-$0}") > /dev/null && pwd) + export NVM_DIR=$(cd $NVM_CD_FLAGS $(dirname "${NVM_SCRIPT_SOURCE:-$0}") > /dev/null && command -p pwd) fi unset NVM_SCRIPT_SOURCE 2> /dev/null From 1c9a5ba2d8931e76ce8f26c9778cbca7720f1c1f Mon Sep 17 00:00:00 2001 From: Brock Angelo Date: Sat, 25 Oct 2014 22:19:27 -0500 Subject: [PATCH 2/2] use slash pwd instead of command --- nvm.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nvm.sh b/nvm.sh index a2ca6b5..de5a5af 100644 --- a/nvm.sh +++ b/nvm.sh @@ -43,7 +43,7 @@ if [ -z "$NVM_DIR" ]; then if [ -n "$BASH_SOURCE" ]; then NVM_SCRIPT_SOURCE="${BASH_SOURCE[0]}" fi - export NVM_DIR=$(cd $NVM_CD_FLAGS $(dirname "${NVM_SCRIPT_SOURCE:-$0}") > /dev/null && command -p pwd) + export NVM_DIR=$(cd $NVM_CD_FLAGS $(dirname "${NVM_SCRIPT_SOURCE:-$0}") > /dev/null && \pwd) fi unset NVM_SCRIPT_SOURCE 2> /dev/null