mirror of
https://github.com/spf13/cobra
synced 2024-11-24 14:47:12 +00:00
Merge pull request #164 from vikstrous/fix_bug
fix bug with PersistentPreRunE
This commit is contained in:
commit
d732ab3a34
1 changed files with 1 additions and 1 deletions
|
@ -522,7 +522,7 @@ func (c *Command) execute(a []string) (err error) {
|
||||||
|
|
||||||
for p := c; p != nil; p = p.Parent() {
|
for p := c; p != nil; p = p.Parent() {
|
||||||
if p.PersistentPreRunE != nil {
|
if p.PersistentPreRunE != nil {
|
||||||
if err := p.PersistentPostRunE(c, argWoFlags); err != nil {
|
if err := p.PersistentPreRunE(c, argWoFlags); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
|
|
Loading…
Reference in a new issue