feat: function to display help, error, & exit

This commit is contained in:
2021-08-02 00:57:05 +01:00
parent d74b7636a1
commit 8267d4202b
2 changed files with 19 additions and 1 deletions

View File

@ -2,6 +2,7 @@ package cli
import (
"context"
"errors"
"fmt"
"path"
"sort"
@ -54,7 +55,7 @@ on your $PATH.
Action: func(c *cli.Context) error {
appType := c.Args().First()
if appType == "" {
cli.ShowSubcommandHelp(c)
errorExit(c, "new", errors.New("no app type provided"))
return nil
}