Reproduction
Invoking this major command without --help leaves no method to run:
src/root.command.ts
import { CommandMajor, Container, Handler } from 'func'
@CommandMajor()
class RootCommand {
@Handler({ flag: 'help' })
help() {}
}
new Container([RootCommand], { argv: [] }).run()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() {}
}
new Container([RootCommand], { argv: [] }).run()