mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
Making project task and bake play nice with creating a new project.
This commit is contained in:
parent
1b5cc91262
commit
c8b0267588
2 changed files with 5 additions and 7 deletions
|
@ -59,8 +59,9 @@ class BakeShell extends Shell {
|
|||
*/
|
||||
public function main() {
|
||||
if (!is_dir($this->DbConfig->path)) {
|
||||
if ($this->Project->execute()) {
|
||||
$this->DbConfig->path = APP_PATH . DS . 'config' . DS;
|
||||
$path = $this->Project->execute();
|
||||
if (!empty($path)) {
|
||||
$this->DbConfig->path = $path . 'config' . DS;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -59,7 +59,7 @@ class ProjectTask extends Shell {
|
|||
|
||||
while (!$project) {
|
||||
$prompt = __("What is the full path for this app including the app directory name?\n Example:");
|
||||
$default = $this->Dispatch->params['working'] . DS . 'myapp';
|
||||
$default = APP_PATH . 'myapp';
|
||||
$project = $this->in($prompt . $default, null, $default);
|
||||
}
|
||||
|
||||
|
@ -124,10 +124,7 @@ class ProjectTask extends Shell {
|
|||
} else {
|
||||
$this->out(__('Project baked but with <warning>some issues.</warning>.'));
|
||||
}
|
||||
|
||||
$this->Dispatch->params['working'] = $path;
|
||||
$this->Dispatch->params['app'] = basename($path);
|
||||
return true;
|
||||
return $path;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue