Skip to content

Commit

Permalink
Merge pull request #90 from cakephp/empty-view
Browse files Browse the repository at this point in the history
Add warning when no template is rendered.
  • Loading branch information
lorenzo committed May 11, 2015
2 parents 21e5df0 + 9c561b8 commit 313a58e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Shell/Task/TemplateTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,7 @@ public function bake($action, $content = '')
$content = $this->getContent($action);
}
if (empty($content)) {
$this->err("<warning>No generated content for '{$action}.ctp', not generating template.");
return false;
}
$this->out("\n" . sprintf('Baking `%s` view file...', $action), 1, Shell::QUIET);
Expand Down

0 comments on commit 313a58e

Please sign in to comment.