feat: by default show help if use do nothing

main
hau 2020-12-18 16:46:17 +07:00
parent 284811f7f4
commit fffbb832be
1 changed files with 5 additions and 0 deletions

View File

@ -108,6 +108,11 @@ type action struct {
} }
func (a *action) Run(c *cli.Context) error { func (a *action) Run(c *cli.Context) error {
// Show help if there is nothing
if c.NArg() == 0 && c.NumFlags() == 0 {
return cli.ShowAppHelp(c)
}
// Set up // Set up
a.getFlags(c) a.getFlags(c)