$HOME environmental variable alteration in cmd/go/go_test.go

41 views
Skip to first unread message

m.hos...@gmail.com

unread,
Aug 27, 2020, 9:21:07 AM8/27/20
to golang-nuts
Hi,
Some of go tests in src/cmd/go was failing on my machine with SSL certificate problem. those test trying to do `go get` and `git clone`. After investigation I found out that in go_test.go file there is a line doing this:
os.Setenv("HOME", "/test-go-home-does-not-exist")
After commenting this line all the test passed without any problem since the `go get` command was able to locate .gitconfig in $HOME.
I just want to know what was the initial reason for changing the HOME in the first place? Am I missing something?

Thanks,
Reply all
Reply to author
Forward
0 new messages