diff --git a/config/source/cli/cli.go b/config/source/cli/cli.go index b12d2d9ff1..3a70f8d680 100644 --- a/config/source/cli/cli.go +++ b/config/source/cli/cli.go @@ -25,7 +25,9 @@ func (c *cliSource) Read() (*source.ChangeSet, error) { for _, f := range c.ctx.App.Flags { name := f.Names()[0] tmp := toEntry(name, c.ctx.Generic(name)) - mergo.Map(&changes, tmp) // need to sort error handling + if err := mergo.Map(&changes, tmp, mergo.WithOverride); err != nil { + return nil, err + } } b, err := c.opts.Encoder.Encode(changes)