feat: show command generate help if no input flags
parent
6aced97056
commit
e2ccc0e5d5
|
@ -31,12 +31,12 @@ var (
|
||||||
func (a *action) RunGenerate(c *cli.Context) error {
|
func (a *action) RunGenerate(c *cli.Context) error {
|
||||||
a.getFlags(c)
|
a.getFlags(c)
|
||||||
|
|
||||||
if !a.flags.interactive {
|
// Show help if there is no flags
|
||||||
// Show help if there is nothing and not in interactive mode
|
|
||||||
if c.NumFlags() == 0 {
|
if c.NumFlags() == 0 {
|
||||||
return cli.ShowAppHelp(c)
|
return cli.ShowCommandHelp(c, commandGenerateName)
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
|
if a.flags.interactive {
|
||||||
fmt.Printf("Input version (%s):\n", flagVersionUsage)
|
fmt.Printf("Input version (%s):\n", flagVersionUsage)
|
||||||
a.flags.version = ioe.ReadInput()
|
a.flags.version = ioe.ReadInput()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue