32a42f27b62b62bd915ab632b0b36fa939d22c0e

Author
Gaurav Misra <keyvez@gmail.com>
Committer
Gaurav Misra <keyvez@gmail.com>
Date

Message

Escape spaces in folder name so script won't fail

If the current directory has spaces, the script fails to change paths and fails.

Diff

 1diff --git a/tools/upgrade.sh b/tools/upgrade.sh
 2index b2a1c06c430171567c25ed5b8e5aff5b2983d2a6..cd689ba1f7ac9e91d7c640832cc352e80678f442 100644
 3--- a/tools/upgrade.sh
 4+++ b/tools/upgrade.sh
 5@@ -1,4 +1,5 @@
 6 current_path=`pwd`
 7+current_path=${current_path/ /\\ }
 8 printf '\033[0;34m%s\033[0m\n' "Upgrading Oh My Zsh"
 9 cd $ZSH
10 
11@@ -16,4 +17,4 @@ else
12   printf '\033[0;31m%s\033[0m\n' 'There was an error updating. Try again later?'
13 fi
14 
15-cd "$current_path"
16+cd "$current_path"