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 @@ -134,20 +134,23 @@ export async function cli(args) {
134
134
if ( options . help ) {
135
135
console . log ( 'Docs can be found at github: https://github.com/coderoad/builder-cli/' ) ;
136
136
}
137
+ else if ( ! options . command ) {
138
+ console . log ( `The command is missing. Chose either 'create' or 'build' and its options.` )
139
+ }
137
140
else {
138
141
switch ( options . command ) {
139
142
case 'build' :
140
143
// Otherwise, continue with the other options
141
144
options = await promptForMissingOptions ( options ) ;
142
145
console . log ( options ) ;
143
- config = await build ( options ) ;
146
+ const config = await build ( options ) ;
144
147
145
148
if ( config ) {
146
149
if ( options . output ) {
147
150
fs . writeFileSync ( options . output , config , 'utf8' ) ;
148
151
}
149
152
else {
150
- console . log ( JSON . stringify ( config ) ) ;
153
+ console . log ( JSON . stringify ( config , null , 2 ) ) ;
151
154
}
152
155
}
153
156
break ;
You can’t perform that action at this time.
0 commit comments