Remove unnecessary if

This commit is contained in:
Djordje Lukic 2020-04-27 15:56:23 +02:00
parent e6597d6139
commit 474cdbae11
1 changed files with 3 additions and 5 deletions

View File

@ -177,12 +177,10 @@ func execMoby(ctx context.Context) {
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
if err := cmd.Run(); err != nil {
if err != nil {
if exiterr, ok := err.(*exec.ExitError); ok {
os.Exit(exiterr.ExitCode())
}
os.Exit(1)
if exiterr, ok := err.(*exec.ExitError); ok {
os.Exit(exiterr.ExitCode())
}
os.Exit(1)
}
os.Exit(0)
}