-
Notifications
You must be signed in to change notification settings - Fork 60
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
Doesn't get real username/userhome when run with sudo #27
Comments
Thank you for reporting this, this should be fixed in the latest commit |
Only now it doesn't work for the root user xd Instead of checking for the uid, you could check for the SUDO_USER variable being present, and if not, fallback to getpwname |
Ops :P I forgot to remove |
Seems that sudo does not change $HOME var, so maybe this is a more elegant solution |
I didn't make a commit because for simple fixes I find it a little overkill (all that git stuff xd) but if you want I could give it a try |
This is fixed now 👍 , feel free to report any other issues/bugs, thank you! |
Maybe this would work, it should check for SUDO_USER/SUDO_UID to check if run with sudo or getpwname otherwise.
The text was updated successfully, but these errors were encountered: