Skip to content

Commit 1f6acbb

Browse files
raidoaddaleax
authored andcommitted
doc: document os.userInfo() throwing SystemError
`os.userInfo()` throws an exception which was not documented in environments like: `docker run --user $(id -u): $(id -g)`. PR-URL: #25724 Fixes: #25714 Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent c4e2bbb commit 1f6acbb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

doc/api/os.md

+3
Original file line numberDiff line numberDiff line change
@@ -451,6 +451,8 @@ system. This differs from the result of `os.homedir()`, which queries several
451451
environment variables for the home directory before falling back to the
452452
operating system response.
453453

454+
Throws a [`SystemError`][] if a user has no `username` or `homedir`.
455+
454456
## OS Constants
455457

456458
The following constants are exported by `os.constants`.
@@ -1313,6 +1315,7 @@ The following process scheduling constants are exported by
13131315
</tr>
13141316
</table>
13151317

1318+
[`SystemError`]: errors.html#errors_system_errors
13161319
[`process.arch`]: process.html#process_process_arch
13171320
[`process.platform`]: process.html#process_process_platform
13181321
[Android building]: https://github.com/nodejs/node/blob/master/BUILDING.md#androidandroid-based-devices-eg-firefox-os

0 commit comments

Comments
 (0)