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

Use effective uid to set the userHome variable #2150

Merged
merged 1 commit into from
Dec 7, 2016

Conversation

amatas
Copy link
Contributor

@amatas amatas commented Dec 5, 2016

Summary

Use the function isRootUser to set the userHome variable if root is the effective user in Linux platform. The $USER environment variable doesn't match the effective user of the process in some cases.

Related to #2123

Test plan

As root, run yarn as an unpriviledged user using sudo command:

[root@fedora nodejs-project]# sudo -u vagrant yarn install
yarn install v0.18.0-20161202.0739
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
Done in 7.77s.

 * Use isRootUser function instead USER environment variable
 * Fix yarnpkg#2123
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