Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding a protection to cake console be executed in driver root (windo…
…ws). Fixes #1408.
- Loading branch information
Showing
2 changed files
with
8 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -501,6 +501,9 @@ function parseParams($params) { | |
} | ||
$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']); | ||
|
@@ -516,8 +519,10 @@ function parseParams($params) { | |
$params['root'] .= '/' . dirname($params['app']); | ||
} | ||
|
||
$params['app'] = basename($params['app']); | ||
$params['working'] = rtrim($params['root'], '/') . '/' . $params['app']; | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
jrbasso
Author
Member
|
||
$params['working'] = rtrim($params['root'], '/'); | ||
if (!$isWin || !preg_match('/^[A-Z]:$/i', $params['app'])) { | ||
$params['working'] .= '/' . $params['app']; | ||
} | ||
|
||
if (!empty($matches[0]) || !empty($isWin)) { | ||
$params = str_replace('/', '\\', $params); | ||
|
This change broke the -app param in shell, using Ubuntu Server 10.10.