From 727001e838b279d9b65d96c2b7c5b6e95fd8e2d7 Mon Sep 17 00:00:00 2001 From: mitch Date: Tue, 25 Oct 2022 09:02:00 -0400 Subject: [PATCH] fixed exit code --- cmd/main.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cmd/main.go b/cmd/main.go index da57d3c..10d6dc3 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -110,10 +110,9 @@ func main() { Stdout: os.Stdout, Stderr: os.Stderr, } - err = cmd.Run() - if err != nil { + if err := cmd.Run(); err != nil { if exitError, ok := err.(*exec.ExitError); ok { - exitError.ExitCode() + os.Exit(exitError.ExitCode()) } } }