prevent logger flag from overriding --help (#1217)

## Type of change

- [x] 🐛 Bugfix

## Issue(s)

* #763

## Test Plan

- [x] 💪 Manual
This commit is contained in:
Keepers 2022-10-19 12:02:05 -06:00 committed by GitHub
parent 86740f1457
commit e57aa124ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -131,6 +131,8 @@ func Seed(ctx context.Context) (ctxOut context.Context, zsl *zap.SugaredLogger)
fs := pflag.NewFlagSet("seed-logger", pflag.ContinueOnError)
fs.ParseErrorsWhitelist.UnknownFlags = true
fs.String("log-level", "info", "set the log level to debug|info|warn|error")
// prevents overriding the corso/cobra help processor
fs.BoolP("help", "h", false, "")
// parse the os args list to find the log level flag
if err := fs.Parse(os.Args[1:]); err != nil {