diff options
author | Ian Lance Taylor <iant@golang.org> | 2021-10-05 15:29:50 -0700 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2021-10-05 23:58:29 +0000 |
commit | ac60900759c29d9c06d9fe131825c4677e47d6a1 (patch) | |
tree | 03639440c6382807afabccf14b4e0892ccf4c3c2 /src/cmd/go/script_test.go | |
parent | e82ed0cd83cec1e6d15ba5a037f77c0b9f1ec8c2 (diff) | |
download | go-git-ac60900759c29d9c06d9fe131825c4677e47d6a1.tar.gz |
cmd/go: use os.ErrProcessDone rather than matching error string
Change-Id: Ied57fb6e71d56618d46aeb36a37a709e08b4346e
Reviewed-on: https://go-review.googlesource.com/c/go/+/354136
Trust: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
Diffstat (limited to 'src/cmd/go/script_test.go')
-rw-r--r-- | src/cmd/go/script_test.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/go/script_test.go b/src/cmd/go/script_test.go index 3c5855bd6f..17782420c7 100644 --- a/src/cmd/go/script_test.go +++ b/src/cmd/go/script_test.go @@ -1172,7 +1172,7 @@ func waitOrStop(ctx context.Context, cmd *exec.Cmd, interrupt os.Signal, killDel err := cmd.Process.Signal(interrupt) if err == nil { err = ctx.Err() // Report ctx.Err() as the reason we interrupted. - } else if err.Error() == "os: process already finished" { + } else if err == os.ErrProcessDone { errc <- nil return } |