Making project task and bake play nice with creating a new project.

This commit is contained in:
mark_story 2010-10-23 00:35:53 -04:00
parent 1b5cc91262
commit c8b0267588
2 changed files with 5 additions and 7 deletions

View file

@ -59,8 +59,9 @@ class BakeShell extends Shell {
*/ */
public function main() { public function main() {
if (!is_dir($this->DbConfig->path)) { if (!is_dir($this->DbConfig->path)) {
if ($this->Project->execute()) { $path = $this->Project->execute();
$this->DbConfig->path = APP_PATH . DS . 'config' . DS; if (!empty($path)) {
$this->DbConfig->path = $path . 'config' . DS;
} else { } else {
return false; return false;
} }

View file

@ -59,7 +59,7 @@ class ProjectTask extends Shell {
while (!$project) { while (!$project) {
$prompt = __("What is the full path for this app including the app directory name?\n Example:"); $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); $project = $this->in($prompt . $default, null, $default);
} }
@ -124,10 +124,7 @@ class ProjectTask extends Shell {
} else { } else {
$this->out(__('Project baked but with <warning>some issues.</warning>.')); $this->out(__('Project baked but with <warning>some issues.</warning>.'));
} }
return $path;
$this->Dispatch->params['working'] = $path;
$this->Dispatch->params['app'] = basename($path);
return true;
} }
} }