diff --git a/internal/features/validation.feature b/internal/features/validation.feature index 4b624b79..b80d085c 100644 --- a/internal/features/validation.feature +++ b/internal/features/validation.feature @@ -56,6 +56,10 @@ Feature: parameter validation When I execute "cli53 rrpurge a b" Then the exit code was 1 + Scenario: list expects no arguments + When I execute "cli53 list a" + Then the exit code was 1 + Scenario: bad usage When I execute "cli53 --bad list" Then the exit code was 1 diff --git a/main.go b/main.go index 8740a589..7fd213cb 100644 --- a/main.go +++ b/main.go @@ -40,6 +40,10 @@ func Main(args []string) int { Flags: commonFlags, Action: func(c *cli.Context) error { r53 = getService(c.Bool("debug"), c.String("profile")) + if len(c.Args()) != 0 { + cli.ShowCommandHelp(c, "list") + return cli.NewExitError("No parameters expected", 1) + } listZones() return nil },