diff --git a/cake/console/shells/bake.php b/cake/console/shells/bake.php index 6c3c02cd2..63b02bfc9 100644 --- a/cake/console/shells/bake.php +++ b/cake/console/shells/bake.php @@ -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'])) { @@ -188,7 +188,7 @@ class BakeShell extends Shell { $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(); } diff --git a/cake/console/shells/shell.php b/cake/console/shells/shell.php index 75c5d2b61..8a4c7ba19 100644 --- a/cake/console/shells/shell.php +++ b/cake/console/shells/shell.php @@ -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. *