From b346227d104b9d372459056999e3eda7bdbade98 Mon Sep 17 00:00:00 2001 From: mark_story Date: Wed, 19 Dec 2012 17:35:56 -0500 Subject: [PATCH] Fix issues with paths + spaces. --- lib/Cake/Console/cake | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/Cake/Console/cake b/lib/Cake/Console/cake index 37742800c..49f2eaa12 100755 --- a/lib/Cake/Console/cake +++ b/lib/Cake/Console/cake @@ -20,10 +20,11 @@ # Canonicalize by following every symlink of the given name recursively canonicalize() { - NAME=$1 + NAME="$1" if [ -f "$NAME" ] then - NAME=$(cd -P -- "$(dirname -- "$NAME")" && pwd -P)/$(basename -- "$NAME") + DIR=$(dirname -- "$NAME") + NAME=$(cd -P "$DIR" && pwd -P)/$(basename -- "$NAME") fi while [ -h "$NAME" ]; do DIR=$(dirname -- "$NAME") @@ -33,9 +34,8 @@ canonicalize() { echo "$NAME" } -CONSOLE=$(dirname $(canonicalize "$0")) +CONSOLE=$(dirname -- "$(canonicalize "$0")") APP=`pwd` -exec php -q $CONSOLE/cake.php -working "$APP" "$@" - -exit; +exec php -q "$CONSOLE"/cake.php -working "$APP" "$@" +exit