From 43c3c2392837b7ef8138bf6de6a95ef822befe12 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Thu, 30 Jun 2016 13:26:31 -0700 Subject: [PATCH] [Fix] install script: remove more unnecessary `cd`ing. Fixes #1137. --- install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index f12882c..e2bc944 100755 --- a/install.sh +++ b/install.sh @@ -82,12 +82,12 @@ install_nvm_from_git() { cd "$INSTALL_DIR" fi command git checkout --quiet "$(nvm_latest_version)" - if [ ! -z "$(cd "$INSTALL_DIR" && git show-ref refs/heads/master)" ]; then + if [ ! -z "$(command git show-ref refs/heads/master)" ]; then if git branch --quiet 2>/dev/null; then - cd "$INSTALL_DIR" && command git branch --quiet -D master >/dev/null 2>&1 + command git branch --quiet -D master >/dev/null 2>&1 else echo >&2 "Your version of git is out of date. Please update it!" - cd "$INSTALL_DIR" && command git branch -D master >/dev/null 2>&1 + command git branch -D master >/dev/null 2>&1 fi fi return