fix: incorrect passing of arguments to setup func

This commit is contained in:
Richard Case 2020-07-17 14:39:16 +01:00
parent dd7754f40b
commit 3a09287ba2
No known key found for this signature in database
GPG key ID: CA007AE33F98458F

View file

@ -767,11 +767,11 @@ func (c *Command) execute(a []string) (err error) {
} }
if c.AdditionalSetupE != nil { if c.AdditionalSetupE != nil {
if err := c.AdditionalSetupE(c, c.Flags().Args()); err != nil { if err := c.AdditionalSetupE(c, a); err != nil {
return err return err
} }
} else if c.AdditionalSetup != nil { } else if c.AdditionalSetup != nil {
c.AdditionalSetup(c, c.flags.Args()) c.AdditionalSetup(c, a)
} }
// initialize help and version flag at the last point possible to allow for user // initialize help and version flag at the last point possible to allow for user