Go Test on Windows says "Access is denied"

已回答

Hi,

I'm facing a bit of an issue in my current project. I'm trying to run a test from within goland. But it constantly hits me with the same error messages:

 

go test vendor/golang.org/x/crypto/poly1305: copying C:\Users\User\AppData\Local\gobuild\c5\c5129a2fc8c382e9806bd1d34eb1febd951bb3b1e1bedebba0ba1e0159439580-d: open C:\Program Files\Go\pkg\windows_amd64\vendor\golang.org\x\crypto\poly1305.a: Access is denied.

and 

go test vendor/golang.org/x/crypto/curve25519: copying C:\Users\User\AppData\Local\go-build\b9\b9485849df6a55f7934584080d3cd07f7fd04b87d56ee9ed060a6a42ece1f3ea-d: open C:\Program Files\Go\pkg\windows_amd64\vendor\golang.org\x\crypto\curve25519.a: Access is denied.

 

That said.. the test runs fine when executed within the goland shell.
Any ideas? 

Thanks in advance Dom

 

GoLand Version: 2020.2.3

Go Version 15.4

Windows Version: 10 Build 19041

0

Hello Dom,

Please open Run | Edit configurations, find run configuration for the test and try to remove -i parameter from arguments list. Does this help?

If the situation has not changed, could you send us a screenshot of the run configuration?

I look forward to hearing from you.

0

I had the same problem but only with -race on.  Disabling BitDefender (anti-virus) fixed the problem.

BitDefender used to prompt to allow .exe files created by GoLand to run but it stopped doing that and I now just get access is denied.  I suspect it is a change in GoLand or Go but it could be BitDefender that is the culprit.

It was working before (it would prompt to give permissions to run the "unsafe" temp .exe). AFAIK nothing has changed (-race option was in use).

$ go version
go version go1.16.6 windows/amd64

GoLand 2021.3
Build #GO-213.5744.269, built on December 2, 2021

0

请先登录再写评论。