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

Linux - user home instead of the root home #19

Closed
aminya opened this issue Jan 19, 2022 · 1 comment
Closed

Linux - user home instead of the root home #19

aminya opened this issue Jan 19, 2022 · 1 comment

Comments

@aminya
Copy link

aminya commented Jan 19, 2022

If you use untildify in a Node process started as a root, it expands to /root/. Is there a way to expand to a user's home instead?

One way I can think of is to use process.env.SUDO_USER

@sindresorhus
Copy link
Owner

You can also downgrade from root. I assume you're using root to be able to use port 80.

#1 could be a solution for you as you could pass in process.env.SUDO_USER.

I don't think this package should have special handling for root. Some users might actually want the root home directory.

@sindresorhus sindresorhus closed this as not planned Won't fix, can't repro, duplicate, stale Jun 11, 2023
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

No branches or pull requests

2 participants