Ensure script only runs in users HOME directory

This commit is contained in:
Anton Osmond 2016-09-07 20:44:58 +01:00
parent ecba036cbf
commit 42f6693db6

3
nvm.sh
View File

@ -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