Skip to content

Use os.UserHomeDir instead of os.Getenv #120

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

Merged
merged 3 commits into from
Jun 13, 2019
Merged

Conversation

karagenc
Copy link
Contributor

This way, SetHomeHistoryPath function works for all operating systems.

This way, SetHomeHistoryPath function works for all operating systems.
@karagenc
Copy link
Contributor Author

Travis check failed because os.UserHomeDir doesn't work with go version 1.10.8.
But in my go version (which is 1.12.5) it works.

@abiosoft
Copy link
Owner

That function was introduced in Go 1.12 and I'm currently reluctant to make Go 1.12 a requirement for this library.
I'll see if I can find a middle ground.

This way, all operating systems (not only Unix, Windows, macOS, but all of them) are supported
@karagenc
Copy link
Contributor Author

Wohooo!
I achieved it with user.Current, and tests are passed successfully
Thank you for your time

@abiosoft abiosoft merged commit 79d20b1 into abiosoft:master Jun 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants