From 4e461155a58e1ddeeda7b58b61b40cddcf293b06 Mon Sep 17 00:00:00 2001 From: Stefan Bodewig Date: Fri, 12 Jul 2002 15:15:46 +0000 Subject: [PATCH] More quotes. I think it has been Diane who said we could almost put the entire script into quotes - she's been right. PR: 9550 git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@273099 13f79535-47bb-0310-9956-ffa450edef68 --- WHATSNEW | 3 +++ src/script/ant | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) 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