diff --git a/internal/cli/main.go b/internal/cli/main.go index 9786164..b26d49e 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) } }