Skip to content

Commit

Permalink
force controller creation
Browse files Browse the repository at this point in the history
  • Loading branch information
jcheron committed Mar 27, 2017
1 parent 1ecfb21 commit 9c0b1db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/Micro.php
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ public static function createController($controllerName,$indexContent=null,$forc
$controllerName=ucfirst($controllerName);
self::safeMkdir("app/controllers");
$filename="app/controllers/{$controllerName}.php";
if(file_exists($filename)){
if(file_exists($filename) && !$force){
$answer=Console::question("The file {$filename} exists.\nWould you like to replace it?",["y","n"]);
if(Console::isYes($answer))
self::createController($controllerName,$indexContent,true);
Expand Down

0 comments on commit 9c0b1db

Please sign in to comment.