Skip to content

Use $HOME environment for user's home directory first #169

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

Closed
wants to merge 1 commit into from

Conversation

phd
Copy link
Contributor

@phd phd commented Mar 11, 2019

Use $HOME environment variable for user's home directory first.
Only then fallback to os/user (parsing /etc/passwd).

This allows user to use a different directory by exporting own value for the $HOME variable.

@CLAassistant
Copy link

CLAassistant commented Mar 11, 2019

CLA assistant check
All committers have signed the CLA.

@phd phd force-pushed the phd-user-home-directory-from-env-A branch from dc5b8a3 to b795725 Compare March 11, 2019 17:00
@ultr
Copy link

ultr commented Jun 5, 2019

bump

@masci
Copy link
Contributor

masci commented Jun 7, 2019

Hi @phd and thanks for the contribution!

We recently switched to go 1.12 and we can use https://golang.org/pkg/os/#UserHomeDir now, can you change your patch so we can get the home path in a cross platform fashion?

@masci masci self-assigned this Jun 7, 2019
@phd
Copy link
Contributor Author

phd commented Jun 8, 2019

Hello @masci
If I have access to my PC anytime soon, I will modify this patch and resubmit it.

@phd
Copy link
Contributor Author

phd commented Jun 9, 2019

I have created a new pull request with the updated patch:
#239

Unfortunately this one change makes arduino-cli compilation fail on Go 1.10.
And sadly Go 1.12 is not widely adopted yet, e.g. Ubuntu has Go 1.10 available by default in 18.04, 18.10 and latest 19.04 releases: https://packages.ubuntu.com/search?keywords=golang&searchon=names&exact=1&suite=all&section=all (yes, you can easily install Go 1.12, still it's not very convenient)

@masci
Copy link
Contributor

masci commented Jun 11, 2019

Superseded by #239

@masci masci closed this Jun 11, 2019
per1234 pushed a commit that referenced this pull request Nov 16, 2020
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.

4 participants