Skip to content

Commit

Permalink
os: convert uid and gid to 32-bit signed integers
Browse files Browse the repository at this point in the history
Make `os.userInfo()` convert the `uid` and `gid` fields to 32-bit signed
integers on Windows.

Refs: libuv/libuv@f3e0bffcb14
  • Loading branch information
lpinca committed Mar 16, 2022
1 parent 061e0db commit 3180604
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/os.js
Expand Up @@ -346,6 +346,11 @@ function userInfo(options) {
if (user === undefined)
throw new ERR_SYSTEM_ERROR(ctx);

if (isWindows) {
user.uid |= 0;
user.gid |= 0
}

return user;
}

Expand Down

0 comments on commit 3180604

Please sign in to comment.