diff --git a/internal/cli/main.go b/internal/cli/main.go index 978616427..b26d49ea6 100644 --- a/internal/cli/main.go +++ b/internal/cli/main.go @@ -262,6 +262,9 @@ Database drivers: `+strings.Join(database.List(), ", ")+"\n") default: flag.Usage() + + // If a command is not found we exit with a status 2 to match the behavior + // of flag.Parse() with flag.ExitOnError when parsing an invalid flag. os.Exit(2) } }