Merge pull request 'fixed exit code' (#2) from test_update into master

Reviewed-on: #2
This commit is contained in:
mitch 2022-10-25 13:03:06 +00:00
commit b4c95f7ce3

View File

@ -110,10 +110,9 @@ func main() {
Stdout: os.Stdout, Stdout: os.Stdout,
Stderr: os.Stderr, Stderr: os.Stderr,
} }
err = cmd.Run() if err := cmd.Run(); err != nil {
if err != nil {
if exitError, ok := err.(*exec.ExitError); ok { if exitError, ok := err.(*exec.ExitError); ok {
exitError.ExitCode() os.Exit(exitError.ExitCode())
} }
} }
} }