Permalink
Browse files

Updating path setting in bake, so paths

are not overwritten.
  • Loading branch information...
1 parent 84a4960 commit 375e175ac80db8caf75441b74ea9d9ad3bcf2d8c @markstory markstory committed Jun 7, 2009
Showing with 5 additions and 3 deletions.
  1. +5 −3 cake/console/libs/bake.php
@@ -49,9 +49,11 @@ class BakeShell extends Shell {
function loadTasks() {
parent::loadTasks();
$task = Inflector::classify($this->command);
- if (isset($this->{$task}) && !in_array($task, array('Project', 'DbConfig', 'Fixture'))) {
- $path = Inflector::underscore(Inflector::pluralize($this->command));
- $this->{$task}->path = $this->params['working'] . DS . $path . DS;
+ if (isset($this->{$task}) && !in_array($task, array('Project', 'DbConfig'))) {
+ if (empty($this->{$task}->path)) {
+ $path = Inflector::underscore(Inflector::pluralize($this->command));
+ $this->{$task}->path = $this->params['working'] . DS . $path . DS;
+ }
if (isset($this->params['connection'])) {
$this->{$task}->connection = $this->params['connection'];
}

0 comments on commit 375e175

Please sign in to comment.