From 1aa2c97c64d60ec03a6810b0f4734964e2c7df8b Mon Sep 17 00:00:00 2001 From: Fabio Forni Date: Sun, 26 Nov 2023 10:58:49 +0100 Subject: [PATCH] main.go: Do not unwrap the Kong error Kong v0.8.1 includes https://github.com/alecthomas/kong/pull/384 which fixes the issue. --- main.go | 7 ------- 1 file changed, 7 deletions(-) diff --git a/main.go b/main.go index b72523f..7e0fb7e 100644 --- a/main.go +++ b/main.go @@ -4,7 +4,6 @@ package main import ( - "errors" "log/slog" "os" @@ -24,12 +23,6 @@ func main() { err := ctx.Run() if err != nil { - if unwrap := errors.Unwrap(err); unwrap != nil { - // kong stupidly wraps the original error with the name - // of the command that generated it. I want errors to be - // readable to users, not developers. - err = unwrap - } slog.Error(err.Error()) os.Exit(1) }