fixed exit code

This commit is contained in:
mitch 2022-10-25 09:02:00 -04:00
parent af2855a18c
commit 727001e838

View File

@ -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())
}
}
}