From 2637d355432023a52dd2e7272446ede9b4d69503 Mon Sep 17 00:00:00 2001 From: mark_story Date: Mon, 15 Dec 2014 21:28:55 -0500 Subject: [PATCH] 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 --- lib/Cake/Console/Command/Task/FixtureTask.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Cake/Console/Command/Task/FixtureTask.php b/lib/Cake/Console/Command/Task/FixtureTask.php index 099fe9516..65404fb1c 100644 --- a/lib/Cake/Console/Command/Task/FixtureTask.php +++ b/lib/Cake/Console/Command/Task/FixtureTask.php @@ -242,8 +242,8 @@ class FixtureTask extends BakeTask { $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: Could not find the '${useTable}' table for ${model}."); + return; } $tableInfo = $data['tables'][$useTable];