diff --git a/WHATSNEW b/WHATSNEW index c1f754be2..956271010 100644 --- a/WHATSNEW +++ b/WHATSNEW @@ -7,6 +7,9 @@ Fixed bugs: * The sh wrapper script didn't work under Cygwin if ANT_HOME wasn't set with a Unix style filename. +* The sh wrapper script could fail if you started Ant from a directory + with whitespace in its name. + Other changes: -------------- diff --git a/src/script/ant b/src/script/ant index 7c78cf660..031a4fa08 100644 --- a/src/script/ant +++ b/src/script/ant @@ -39,8 +39,8 @@ if [ -z "$ANT_HOME" ] ; then ANT_HOME=/opt/ant fi - if [ -d ${HOME}/opt/ant ] ; then - ANT_HOME=${HOME}/opt/ant + if [ -d "${HOME}/opt/ant" ] ; then + ANT_HOME="${HOME}/opt/ant" fi ## resolve links - $0 may be a link to ant's home @@ -66,7 +66,7 @@ if [ -z "$ANT_HOME" ] ; then # make it fully qualified ANT_HOME=`cd "$ANT_HOME" && pwd` - cd $saveddir + cd "$saveddir" fi # For Cygwin, ensure paths are in UNIX format before anything is touched