mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Adding a protection to cake console be executed in driver root (windows). Fixes #1408.
This commit is contained in:
parent
6338299e77
commit
e1b3703c20
4 changed files with 6 additions and 3 deletions
|
@ -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.
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
|
|
@ -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']);
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
|
Loading…
Reference in a new issue