From b9e25fa4a06011fa3a4e3ea9a2b5d5b416f924cb Mon Sep 17 00:00:00 2001 From: Eric Paris Date: Mon, 6 Apr 2015 14:54:26 -0400 Subject: [PATCH] Slight formatting change, to make next commit more readable --- command.go | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/command.go b/command.go index 7e52d34..9c3a701 100644 --- a/command.go +++ b/command.go @@ -422,19 +422,18 @@ func (c *Command) execute(a []string) (err error) { c.Usage() r.SetOutput(out) return err - } else { - // If help is called, regardless of other flags, we print that. - // Print help also if c.Run is nil. - if c.helpFlagVal || !c.Runnable() { - c.Help() - return nil - } - - c.preRun() - argWoFlags := c.Flags().Args() - c.Run(c, argWoFlags) + } + // If help is called, regardless of other flags, we print that. + // Print help also if c.Run is nil. + if c.helpFlagVal || !c.Runnable() { + c.Help() return nil } + + c.preRun() + argWoFlags := c.Flags().Args() + c.Run(c, argWoFlags) + return nil } func (c *Command) preRun() {