From 42f6693db6d388cdb83906e486181b9dfc0c413c Mon Sep 17 00:00:00 2001 From: Anton Osmond Date: Wed, 7 Sep 2016 20:44:58 +0100 Subject: [PATCH] Ensure script only runs in users HOME directory --- nvm.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nvm.sh b/nvm.sh index b208b84..d630806 100644 --- a/nvm.sh +++ b/nvm.sh @@ -97,6 +97,9 @@ nvm_print_npm_version() { fi } +# Ensure this only runs in the users $HOME directory +cd "$HOME" + # Make zsh glob matching behave same as bash # This fixes the "zsh: no matches found" errors if [ -z "${NVM_CD_FLAGS-}" ]; then