Reproduction
Invoking this major command without --help leaves no method to run:
src/root.command.ts
import { CommandMajor, Handler, Module, createApp } from 'func'
@CommandMajor()
class RootCommand {
@Handler({ flag: 'help' })
help() {}
}
@Module({ commands: [RootCommand] })
class AppModule {}
await createApp(AppModule).bootstrap({ argv: [] })How to fix it
Add one default handler, or ensure every valid invocation selects a declared flag or path:
src/root.command.ts
class RootCommand {
@Handler({ flag: 'help' })
help() {}
@Handler()
run() {}
}
@Module({ commands: [RootCommand] })
class AppModule {}
await createApp(AppModule).bootstrap({ argv: [] })