Skip to content

Commit 9268392

Browse files
committed
Fix bugs on variables
1 parent 9675396 commit 9268392

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/cli.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,20 +134,23 @@ export async function cli(args) {
134134
if (options.help) {
135135
console.log('Docs can be found at github: https://github.com/coderoad/builder-cli/');
136136
}
137+
else if (!options.command) {
138+
console.log(`The command is missing. Chose either 'create' or 'build' and its options.`)
139+
}
137140
else {
138141
switch (options.command) {
139142
case 'build':
140143
// Otherwise, continue with the other options
141144
options = await promptForMissingOptions(options);
142145
console.log(options);
143-
config = await build(options);
146+
const config = await build(options);
144147

145148
if (config) {
146149
if (options.output) {
147150
fs.writeFileSync(options.output, config, 'utf8');
148151
}
149152
else {
150-
console.log(JSON.stringify(config));
153+
console.log(JSON.stringify(config, null, 2));
151154
}
152155
}
153156
break;

0 commit comments

Comments
 (0)