Adding fix for #2877, adds quit option in bake.php

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5412 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
phpnut 2007-07-08 23:48:05 +00:00
parent f792004469
commit d2ed329e76

View file

@ -54,8 +54,9 @@ class BakeShell extends Shell {
$this->out('[M]odel');
$this->out('[V]iew');
$this->out('[C]ontroller');
$this->out('[Q]uit');
$classToBake = strtoupper($this->in('What would you like to Bake?', array('M', 'V', 'C')));
$classToBake = strtoupper($this->in('What would you like to Bake?', array('M', 'V', 'C', 'Q')));
switch($classToBake) {
case 'M':
$this->Model->execute();
@ -66,6 +67,9 @@ class BakeShell extends Shell {
case 'C':
$this->Controller->execute();
break;
case 'Q':
exit(0);
break;
default:
$this->out('You have made an invalid selection. Please choose a type of class to Bake by entering M, V, or C.');
}