From 649e416017827575904d95b5d1dc7b7472deafb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Larivi=C3=A8re?= Date: Sat, 30 Jan 2016 20:46:25 -0500 Subject: [PATCH] [Refactor]Double quote to prevent globbing and word splitting. --- install.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/install.sh b/install.sh index 15824c4eb8..c1da5b511a 100755 --- a/install.sh +++ b/install.sh @@ -69,7 +69,7 @@ install_nvm_from_git() { mkdir -p "$NVM_DIR" command git clone "$(nvm_source git)" "$NVM_DIR" fi - cd "$NVM_DIR" && command git checkout --quiet $(nvm_latest_version) + cd "$NVM_DIR" && command git checkout --quiet "$(nvm_latest_version)" if [ ! -z "$(cd "$NVM_DIR" && git show-ref refs/heads/master)" ]; then if git branch --quiet 2>/dev/null; then cd "$NVM_DIR" && command git branch --quiet -D master >/dev/null 2>&1 @@ -123,15 +123,15 @@ nvm_detect_profile() { local DETECTED_PROFILE DETECTED_PROFILE='' local SHELLTYPE - SHELLTYPE="$(basename /$SHELL)" + SHELLTYPE="$(basename "/$SHELL")" - if [ $SHELLTYPE = "bash" ]; then + if [ "$SHELLTYPE" = "bash" ]; then if [ -f "$HOME/.bashrc" ]; then DETECTED_PROFILE="$HOME/.bashrc" elif [ -f "$HOME/.bash_profile" ]; then DETECTED_PROFILE="$HOME/.bash_profile" fi - elif [ $SHELLTYPE = "zsh" ]; then + elif [ "$SHELLTYPE" = "zsh" ]; then DETECTED_PROFILE="$HOME/.zshrc" fi