fixed exit code #2

Merged
mitch merged 1 commits from test_update into master 2022-10-25 13:03:07 +00:00
Showing only changes of commit 727001e838 - Show all commits

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