From d62b707304cf4cf79148b7d380efff9c22886f11 Mon Sep 17 00:00:00 2001 From: Stephan Telling Date: Sun, 7 May 2017 19:34:21 +0200 Subject: [PATCH] fix bash expansion issue in mvim --- src/MacVim/mvim | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/MacVim/mvim b/src/MacVim/mvim index d4fda6ca34..daad9fbd61 100755 --- a/src/MacVim/mvim +++ b/src/MacVim/mvim @@ -11,22 +11,22 @@ # # Find Vim executable -if [ -L $0 ]; then +if [ -L "$0" ]; then # readlink -f curdir=`pwd -P` self_path=$0 - cd `dirname $self_path` - while [ -L $self_path ]; do + cd "`dirname $self_path`" + while [ -L "$self_path" ]; do self_path=`readlink $self_path` - cd `dirname $self_path` + cd "`dirname $self_path`" self_path=`basename $self_path` done binary="`pwd -P`/../MacOS/Vim" - cd $curdir + cd "$curdir" else binary="`dirname "$0"`/../MacOS/Vim" fi -if ! [ -x $binary ]; then +if ! [ -x "$binary" ]; then echo "Sorry, cannot find Vim executable." exit 1 fi