mirror of
https://github.com/spf13/cobra
synced 2024-11-24 22:57:12 +00:00
Slight formatting change, to make next commit more readable
This commit is contained in:
parent
29e27b1649
commit
b9e25fa4a0
1 changed files with 10 additions and 11 deletions
|
@ -422,7 +422,7 @@ func (c *Command) execute(a []string) (err error) {
|
||||||
c.Usage()
|
c.Usage()
|
||||||
r.SetOutput(out)
|
r.SetOutput(out)
|
||||||
return err
|
return err
|
||||||
} else {
|
}
|
||||||
// If help is called, regardless of other flags, we print that.
|
// If help is called, regardless of other flags, we print that.
|
||||||
// Print help also if c.Run is nil.
|
// Print help also if c.Run is nil.
|
||||||
if c.helpFlagVal || !c.Runnable() {
|
if c.helpFlagVal || !c.Runnable() {
|
||||||
|
@ -435,7 +435,6 @@ func (c *Command) execute(a []string) (err error) {
|
||||||
c.Run(c, argWoFlags)
|
c.Run(c, argWoFlags)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
func (c *Command) preRun() {
|
func (c *Command) preRun() {
|
||||||
for _, x := range initializers {
|
for _, x := range initializers {
|
||||||
|
|
Loading…
Reference in a new issue