diff options
| author | Tomas Aschan <[email protected]> | 2025-08-29 22:13:14 +0200 |
|---|---|---|
| committer | Tomas Aschan <[email protected]> | 2025-08-29 22:13:14 +0200 |
| commit | b55ffb6b7ca272b5085317ae58e4631a0f90199d (patch) | |
| tree | 9dae445b702a32eb21612c4f18448f9e540dc81c | |
| parent | 7c651d1d398142c3056ff45df14f2019bad2146d (diff) | |
fix: Don't print ErrHelp in ParseAll
This is a fixup of #407 to ensure behavior of ExitOnError is consistent.
| -rw-r--r-- | flag.go | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -1202,6 +1202,9 @@ func (f *FlagSet) ParseAll(arguments []string, fn func(flag *Flag, value string) case ContinueOnError: return err case ExitOnError: + if err == ErrHelp { + os.Exit(0) + } fmt.Fprintln(f.Output(), err) os.Exit(2) case PanicOnError: |
