Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Don't quit bake when a table is missing.
When a table is missing print a warning to stderr but don't exit. This
allows people to use `bake fixture all` with non-conventional tables.

Refs #5377
  • Loading branch information
markstory committed Dec 16, 2014
1 parent af8febf commit 2637d35
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Cake/Console/Command/Task/FixtureTask.php
Expand Up @@ -242,8 +242,8 @@ public function bake($model, $useTable = false, $importOptions = array()) {
$this->_Schema = new CakeSchema();
$data = $this->_Schema->read(array('models' => false, 'connection' => $this->connection));
if (!isset($data['tables'][$useTable])) {
$this->error('Could not find your selected table ' . $useTable);
return false;
$this->err("<warning>Warning:</warning> Could not find the '${useTable}' table for ${model}.");
return;
}

$tableInfo = $data['tables'][$useTable];
Expand Down

0 comments on commit 2637d35

Please sign in to comment.