Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion bin/commands/generate.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,13 @@ export default new Command('generate')
.addOption(new Option('--type-map <url>', 'Type map URL or path'))

.action(
errorWrap(async opts => {
errorWrap(async (opts, command) => {
// Running `generate` with no arguments or config has nothing to do, so
// show the help output instead of failing later with an opaque error.
if (Object.keys(opts).length === 0) {
command.help();
}
Comment thread
avivkeller marked this conversation as resolved.
Outdated

const config = await setConfig(opts);
await runGenerators(config);
})
Expand Down
Loading