cmd/wails: report error status code to OS (#252)

Fixes #251.
This commit is contained in:
Robin Eklind
2019-10-08 19:44:32 +02:00
committed by Lea Anthony
parent 9fff0a513e
commit a7f61e335e

View File

@@ -1,6 +1,9 @@
package main
import (
"os"
"os/exec"
"github.com/wailsapp/wails/cmd"
)
@@ -15,5 +18,9 @@ func main() {
err := app.Run()
if err != nil {
logger.Error(err.Error())
if exitErr, ok := err.(*exec.ExitError); ok {
os.Exit(exitErr.ExitCode())
}
os.Exit(1)
}
}