浏览代码

Quote $ZSH where necessary in install script (#6587)

Quote $ZSH where necessary in install script
Dan Wallis 6 年之前
父节点
当前提交
fec0089cdd
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      tools/install.sh

+ 3 - 3
tools/install.sh

@@ -59,7 +59,7 @@ main() {
       exit 1
     fi
   fi
-  env git clone --depth=1 https://github.com/robbyrussell/oh-my-zsh.git $ZSH || {
+  env git clone --depth=1 https://github.com/robbyrussell/oh-my-zsh.git "$ZSH" || {
     printf "Error: git clone of oh-my-zsh repo failed\n"
     exit 1
   }
@@ -72,9 +72,9 @@ main() {
   fi
 
   printf "${BLUE}Using the Oh My Zsh template file and adding it to ~/.zshrc${NORMAL}\n"
-  cp $ZSH/templates/zshrc.zsh-template ~/.zshrc
+  cp "$ZSH"/templates/zshrc.zsh-template ~/.zshrc
   sed "/^export ZSH=/ c\\
-  export ZSH=$ZSH
+  export ZSH=\"$ZSH\"
   " ~/.zshrc > ~/.zshrc-omztemp
   mv -f ~/.zshrc-omztemp ~/.zshrc