-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
Closed
Labels
docIssues and PRs related to the documentations.Issues and PRs related to the documentations.osIssues and PRs related to the os subsystem.Issues and PRs related to the os subsystem.
Description
Original issue opened here: sindresorhus/username#21
It turns out that running a script with docker run with --user flag set, then user actually has no $HOME or username. This in turn causes following error: uv_os_get_passwd returned ENOENT (no such file or directory) if os.userInfo() is accessed.
Some people have resorted to try catch blocks:
But is is not documented that os.userInfo() ever throws - https://nodejs.org/dist/latest-v10.x/docs/api/os.html#os_os_userinfo_options
- Version: v8, v10
- Platform: Linux, Docker container
sindresorhus and alitoufighi
Metadata
Metadata
Assignees
Labels
docIssues and PRs related to the documentations.Issues and PRs related to the documentations.osIssues and PRs related to the os subsystem.Issues and PRs related to the os subsystem.