Skip to content

Commit

Permalink
Adding common parameter handling for connection
Browse files Browse the repository at this point in the history
and plugin params.
  • Loading branch information
markstory committed May 4, 2009
1 parent 1cc3a6e commit 6180ca8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cake/console/libs/bake.php
Expand Up @@ -52,6 +52,12 @@ function loadTasks() {
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->params['connection'])) {
$this->{$task}->connection = $this->params['connection'];
}
if (isset($this->params['plugin'])) {
$this->{$task}->plugin = $this->params['plugin'];
}
if (!is_dir($this->{$task}->path)) {
$this->err(sprintf(__("%s directory could not be found.\nBe sure you have created %s", true), $task, $this->{$task}->path));
$this->_stop();
Expand Down

0 comments on commit 6180ca8

Please sign in to comment.