diff --git a/v2/ahoy.go b/v2/ahoy.go index 5df8f75..d577a51 100644 --- a/v2/ahoy.go +++ b/v2/ahoy.go @@ -292,7 +292,7 @@ func getCommands(config Config) []*cli.Command { fmt.Fprintln(os.Stderr) os.Exit(1) } - return nil + return nil } } @@ -372,7 +372,7 @@ func addDefaultCommands(commands []*cli.Command) []*cli.Command { fmt.Println("Example .ahoy.yml downloaded to the current directory. You can customize it to suit your needs!") } } - return nil + return nil }, } @@ -429,7 +429,7 @@ func NoArgsAction(c *cli.Context) error { // Exit gracefully if we get to here. os.Exit(0) - return nil + return nil } // BeforeCommand runs before every command so arguments or flags must be passed diff --git a/v2/tests/sub-commands.bats b/v2/tests/sub-commands.bats index 3e4ad4a..e9e411e 100644 --- a/v2/tests/sub-commands.bats +++ b/v2/tests/sub-commands.bats @@ -59,7 +59,7 @@ teardown() { [ "$status" -eq 1 ] # Check that sub1-cmd and sub2-cmd are listed under main-cmd - run ./ahoy main-cmd --help + run ./ahoy main-cmd echo $output [ "$status" -eq 0 ] [[ "$output" =~ "sub1-cmd" ]]