mirror of
https://github.com/spf13/cobra
synced 2025-05-07 13:57:21 +00:00
fix: incorrect passing of arguments to setup func
This commit is contained in:
parent
dd7754f40b
commit
3a09287ba2
1 changed files with 2 additions and 2 deletions
|
@ -767,11 +767,11 @@ func (c *Command) execute(a []string) (err error) {
|
|||
}
|
||||
|
||||
if c.AdditionalSetupE != nil {
|
||||
if err := c.AdditionalSetupE(c, c.Flags().Args()); err != nil {
|
||||
if err := c.AdditionalSetupE(c, a); err != nil {
|
||||
return err
|
||||
}
|
||||
} 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
|
||||
|
|
Loading…
Add table
Reference in a new issue