Skip to content

Commit

Permalink
Adding Shel::$command back in as it was still being used, oops.
Browse files Browse the repository at this point in the history
Updating Bakeshell to do its tricks at the correct time.
  • Loading branch information
markstory committed Oct 18, 2010
1 parent 561067e commit 8f0a96d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cake/console/shells/bake.php
Expand Up @@ -43,8 +43,8 @@ class BakeShell extends Shell {
* Override loadTasks() to handle paths
*
*/
public function loadTasks() {
parent::loadTasks();
public function startup() {
parent::startup();
$task = Inflector::classify($this->command);
if (isset($this->{$task}) && !in_array($task, array('Project', 'DbConfig'))) {
if (isset($this->params['connection'])) {
Expand Down Expand Up @@ -188,7 +188,7 @@ public function all() {
$this->out(__('Bake All complete'));
array_shift($this->args);
} else {
$this->err(__('Bake All could not continue without a valid model'));
$this->error(__('Bake All could not continue without a valid model'));
}
$this->_stop();
}
Expand Down
7 changes: 7 additions & 0 deletions cake/console/shells/shell.php
Expand Up @@ -68,6 +68,13 @@ class Shell extends Object {
*/
public $params = array();

/**
* The command (method/task) that is being run.
*
* @var string
*/
public $command;

/**
* Contains arguments parsed from the command line.
*
Expand Down

0 comments on commit 8f0a96d

Please sign in to comment.