diff --git a/app/console/cake.bat b/app/console/cake.bat index ed04546c9..7d0c1247d 100644 --- a/app/console/cake.bat +++ b/app/console/cake.bat @@ -25,7 +25,7 @@ SET app=%0 SET lib=%~dp0 -php -q "%lib%cake.php" -working "%CD%" %* +php -q "%lib%cake.php" -working "%CD% " %* echo. diff --git a/cake/console/cake.bat b/cake/console/cake.bat index 40a271425..a22cfcacd 100644 --- a/cake/console/cake.bat +++ b/cake/console/cake.bat @@ -25,7 +25,7 @@ SET app=%0 SET lib=%~dp0 -php -q "%lib%cake.php" -working "%CD%" %* +php -q "%lib%cake.php" -working "%CD% " %* echo. diff --git a/cake/console/shell_dispatcher.php b/cake/console/shell_dispatcher.php index 1b520500b..0a625f8cd 100644 --- a/cake/console/shell_dispatcher.php +++ b/cake/console/shell_dispatcher.php @@ -244,6 +244,9 @@ class ShellDispatcher { } $params = str_replace('\\', '/', $params); + if (isset($params['working'])) { + $params['working'] = trim($params['working']); + } if (!empty($params['working']) && (!isset($this->args[0]) || isset($this->args[0]) && $this->args[0]{0} !== '.')) { if (empty($this->params['app']) && $params['working'] != $params['root']) { $params['root'] = dirname($params['working']); diff --git a/cake/console/templates/skel/console/cake.bat b/cake/console/templates/skel/console/cake.bat index ed04546c9..7d0c1247d 100644 --- a/cake/console/templates/skel/console/cake.bat +++ b/cake/console/templates/skel/console/cake.bat @@ -25,7 +25,7 @@ SET app=%0 SET lib=%~dp0 -php -q "%lib%cake.php" -working "%CD%" %* +php -q "%lib%cake.php" -working "%CD% " %* echo.