diff --git a/cake/console/shells/bake.php b/cake/console/shells/bake.php index 5e934b351..dfd048194 100644 --- a/cake/console/shells/bake.php +++ b/cake/console/shells/bake.php @@ -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; } diff --git a/cake/console/shells/tasks/project.php b/cake/console/shells/tasks/project.php index 310ac8016..a0814fb13 100644 --- a/cake/console/shells/tasks/project.php +++ b/cake/console/shells/tasks/project.php @@ -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 some issues..')); } - - $this->Dispatch->params['working'] = $path; - $this->Dispatch->params['app'] = basename($path); - return true; + return $path; } }