Skip to content

Commit 621ae7f

Browse files
committed
os: convert uid and gid to 32-bit signed integers
Make `os.userInfo()` convert the `uid` and `gid` fields to 32-bit signed integers on Windows. Refs: libuv/libuv@f3e0bffcb14
1 parent 061e0db commit 621ae7f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/os.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,11 @@ function userInfo(options) {
346346
if (user === undefined)
347347
throw new ERR_SYSTEM_ERROR(ctx);
348348

349+
if (isWindows) {
350+
user.uid |= 0;
351+
user.gid |= 0;
352+
}
353+
349354
return user;
350355
}
351356

0 commit comments

Comments
 (0)