From 3a09287ba25ef8007d4f33b8a6639de672017514 Mon Sep 17 00:00:00 2001 From: Richard Case <198425+richardcase@users.noreply.github.com> Date: Fri, 17 Jul 2020 14:39:16 +0100 Subject: [PATCH] fix: incorrect passing of arguments to setup func --- command.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/command.go b/command.go index c00ea6be..b8926f6b 100644 --- a/command.go +++ b/command.go @@ -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