Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

os: TestUserHomeDir fails on windows-arm #28182

Closed
alexbrainman opened this issue Oct 13, 2018 · 2 comments
Closed

os: TestUserHomeDir fails on windows-arm #28182

alexbrainman opened this issue Oct 13, 2018 · 2 comments

Comments

@alexbrainman
Copy link
Member

@alexbrainman alexbrainman commented Oct 13, 2018

Our windows-arm builder fails https://build.golang.org/log/024228bdaccb0c0f92bc505bdfc1f2287b9ef818 in

--- FAIL: TestUserHomeDir (0.00s)
    os_test.go:2340: UserHomeDir returned an empty string
FAIL
FAIL	os	16.058s

I looked at os.UserHomeDir windows implementation, and it just returns

return Getenv("HOMEDRIVE") + Getenv("HOMEPATH")

So, obviously, windows-arm builder process does not have %HOMEDRIVE% and %HOMEPATH% set. Is that because the process was configured that way, or windows-arm does not have these variables set? If variables are not set on all windows-arm computers, how do we determine what HOME directory is?

Questions for @jordanrh1

Thank you.

Alex

@jordanrh1

This comment has been minimized.

Copy link
Contributor

@jordanrh1 jordanrh1 commented Oct 16, 2018

Hi Alex, I think it would be better to use %userprofile%. USERPROFILE is the equivalent of $HOME on linux.

@gopherbot

This comment has been minimized.

Copy link

@gopherbot gopherbot commented Oct 17, 2018

Change https://golang.org/cl/142886 mentions this issue: os: change UserHomeDir to use USERPROFILE on windows

@gopherbot gopherbot closed this in 5ddec24 Oct 17, 2018
@golang golang locked and limited conversation to collaborators Oct 17, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.