From 4e3820bfb2ea2331d420033ae77d341ed049c2a5 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Mon, 6 Jul 2020 15:04:35 +0200 Subject: pkg/osutil: don't use os.ProcessState.ExitCode on appengine It's not present in Go 1.11. --- pkg/osutil/osutil.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'pkg/osutil/osutil.go') diff --git a/pkg/osutil/osutil.go b/pkg/osutil/osutil.go index 4575809e1..6a59a9857 100644 --- a/pkg/osutil/osutil.go +++ b/pkg/osutil/osutil.go @@ -61,14 +61,10 @@ func Run(timeout time.Duration, cmd *exec.Cmd) ([]byte, error) { if <-timedout { text = fmt.Sprintf("timedout %q", cmd.Args) } - exitCode := 0 - if exitError, ok := err.(*exec.ExitError); ok { - exitCode = exitError.ProcessState.ExitCode() - } return output.Bytes(), &VerboseError{ Title: text, Output: output.Bytes(), - ExitCode: exitCode, + ExitCode: exitCode(err), } } return output.Bytes(), nil -- cgit mrf-deployment