Skip to content

Commit 2fcf851

Browse files
lpincaRafaelGSS
authored andcommitted
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. PR-URL: #42340 Refs: libuv/libuv@f3e0bffcb14 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Juan José Arboleda <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Darshan Sen <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
1 parent 9f3d2f6 commit 2fcf851

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/os.js

+5
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,11 @@ function userInfo(options) {
354354
if (user === undefined)
355355
throw new ERR_SYSTEM_ERROR(ctx);
356356

357+
if (isWindows) {
358+
user.uid |= 0;
359+
user.gid |= 0;
360+
}
361+
357362
return user;
358363
}
359364

0 commit comments

Comments
 (0)