File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -61,6 +61,7 @@ component aliases="wheels g app" extends="../base" {
61
61
* @cfmlEngine The CFML engine to use for the app
62
62
* @setupH2 Setup the H2 database for development
63
63
* @init "init" the directory as a package if it isn't already
64
+ * @force Force installation into an none empty directory
64
65
**/
65
66
function run (
66
67
name = ' MyCFWheelsApp' ,
@@ -70,7 +71,8 @@ component aliases="wheels g app" extends="../base" {
70
71
datasourceName ,
71
72
cfmlEngine = ' lucee' ,
72
73
boolean setupH2 = false ,
73
- boolean init = false
74
+ boolean init = false ,
75
+ boolean force = false
74
76
) {
75
77
// set defaults based on app name
76
78
if ( ! len ( arguments .directory ) ) {
@@ -88,8 +90,9 @@ component aliases="wheels g app" extends="../base" {
88
90
print .greenBoldLine ( ' Creating the target directory...' ).toConsole ();
89
91
directoryCreate ( arguments .directory );
90
92
} else {
91
- if ( arrayLen ( directoryList ( arguments .directory , false ) ) ) {
93
+ if ( arrayLen ( directoryList ( arguments .directory , false ) ) && ! force ) {
92
94
print .greenBoldLine ( ' The target directory is not empty. The installation cannot continue.' ).toConsole ();
95
+ print .greenBoldLine ( force ).toConsole ();
93
96
return ;
94
97
}
95
98
}
You can’t perform that action at this time.
0 commit comments