Browse Source

Set debug=2 when bake is run.
This should help with model caches being re-used when they shouldn't.
Fixes #2063

mark_story 14 years ago
parent
commit
e56a2cdb2b

+ 1 - 0
lib/Cake/Console/Command/BakeShell.php

@@ -65,6 +65,7 @@ class BakeShell extends Shell {
  * @return mixed
  */
 	public function main() {
+		Configure::write('debug', 2);
 		Configure::write('Cache.disable', 1);
 
 		if (!is_dir($this->DbConfig->path)) {

+ 2 - 1
lib/Cake/Console/Command/Task/BakeTask.php

@@ -46,12 +46,13 @@ class BakeTask extends Shell {
 	public $interactive = false;
 
 /**
- * Disable caching for baking.
+ * Disable caching and enable debug for baking.
  * This forces the most current database schema to be used.
  *
  * @return void
  */
 	function startup() {
+		Configure::write('debug', 2);
 		Configure::write('Cache.disable', 1);
 		parent::startup();
 	}