cmd/go: sometimes name tmp test binary test.test.exe on Windows
Right now it is always pkgname.test.exe, but if pkgname is patch or install or setup or update, Windows thinks that running it will install new software, so it pops up a dialog box asking for more permission. Renaming the binary avoids the Windows security check. This only applies to the binary that the Go command writes to its temporary work directory. If the user runs 'go test -c' or any of the other ways to generate a test binary, it will continue to use pkgname.test.exe. Fixes #8711. LGTM=bradfitz R=golang-codereviews, r CC=alex.brainman, bradfitz, golang-codereviews, iant https://golang.org/cl/146580043
Showing
Please
register
or
sign in
to comment