aboutsummaryrefslogtreecommitdiff
path: root/flag.go
diff options
context:
space:
mode:
Diffstat (limited to 'flag.go')
-rw-r--r--flag.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/flag.go b/flag.go
index 107fa19..2b21b6f 100644
--- a/flag.go
+++ b/flag.go
@@ -1173,6 +1173,9 @@ func (f *FlagSet) Parse(arguments []string) error {
case ContinueOnError:
return err
case ExitOnError:
+ if err == ErrHelp {
+ os.Exit(0)
+ }
fmt.Fprintln(f.Output(), err)
os.Exit(2)
case PanicOnError: