diff options
author | Ron Evans <[email protected]> | 2019-06-18 13:36:48 +0200 |
---|---|---|
committer | Ron Evans <[email protected]> | 2019-06-18 13:45:11 +0200 |
commit | 16201c41dc69d4d7896e85653580dee35382fd23 (patch) | |
tree | aec05a87b46fa314de3db618f26fdd46e89225bf | |
parent | 208e1719ad9a8e7ff94e8aac900909c37747a04f (diff) | |
download | tinygo-16201c41dc69d4d7896e85653580dee35382fd23.tar.gz tinygo-16201c41dc69d4d7896e85653580dee35382fd23.zip |
test: replace ExitStatus() with go1.11 compatible syntax
Signed-off-by: Ron Evans <[email protected]>
-rw-r--r-- | main.go | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -367,7 +367,10 @@ func Test(pkgName, target string, config *BuildConfig) error { if err != nil { // Propagate the exit code if err, ok := err.(*exec.ExitError); ok { - os.Exit(err.ExitCode()) + if status, ok := err.Sys().(syscall.WaitStatus); ok { + os.Exit(status.ExitStatus()) + } + os.Exit(1) } return &commandError{"failed to run compiled binary", tmppath, err} } |