]> Cypherpunks repositories - gostls13.git/commit
cmd/go: fix bug in using the workfile flag with tests
authorMichael Matloob <matloob@golang.org>
Fri, 19 Nov 2021 21:09:52 +0000 (16:09 -0500)
committerMichael Matloob <matloob@golang.org>
Wed, 24 Nov 2021 19:11:35 +0000 (19:11 +0000)
commit4da06e7b00ae9965ec7d2f6f131266e44f966754
treea2c1075320673bfc9ad93adbd66e99a06ee2a5bd
parente883005d2ae5c9de0f3a072af53968da299bb8a8
cmd/go: fix bug in using the workfile flag with tests

Tests do custom flag processing so we must process the workfile flag
after that happens.

Also fix an issue where errors weren't handled properly when the
workfile wasn't absolute (the go command should just exit), and where a
parse error was just dropped.

Fixes #48576

Change-Id: I3a94d8d3a515114b2c4cc0e73f63447df2fc6bc9
Reviewed-on: https://go-review.googlesource.com/c/go/+/366174
Trust: Michael Matloob <matloob@golang.org>
Run-TryBot: Michael Matloob <matloob@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
src/cmd/go/internal/modload/init.go
src/cmd/go/internal/test/test.go
src/cmd/go/testdata/script/work_workfile.txt [new file with mode: 0644]