Go 1.23 is having trouble running a basic Hello World unit test suite on Windows Server 2019 Jenkins nodes when installed ephemerally.
Critically, when go test
tries to initialize GOCACHE, then it dies with a mkdir error The system cannot find the file specified
, citing the very 00
directory in GOCACHE that it just created. Explorer confirms the directory was created successfully.
Is Go truly shelling out to initialize GOCACHE, instead of invoking ordinary os.Mkdir[All]
functions?
Go seems to work better in PowerShell. Could the problem be due to Go targeting the cmd.exe shell, which historically has severe limitations?
https://groups.google.com/g/alt.msdos.batch/c/z_H4JWPih-A/m/C499Mq4eJpAJ?pli=1
go clean -cache
succeeds (in PowerShell). But it neglects to create the directories that go test
ends up trying and failing to create.