diff options
Diffstat (limited to 'command/parse.go')
| -rw-r--r-- | command/parse.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/command/parse.go b/command/parse.go index 8e21433c..1a3f2ce3 100644 --- a/command/parse.go +++ b/command/parse.go @@ -91,8 +91,8 @@ func (n *node) MustParse(arguments []string, handleError func(error)) { case ErrEmptyTree: os.Exit(1) default: - var flagError FlagError - if !errors.As(err, &flagError) { // returned by HandlerFunc + flagError, ok := errors.AsType[FlagError](err) + if !ok { // returned by HandlerFunc handleError(err) os.Exit(1) } |
