From 318060459d162b79a14bd35aa5deb3090a9ea04e Mon Sep 17 00:00:00 2001 From: Luigi Pinca Date: Wed, 16 Mar 2022 09:46:47 +0100 Subject: [PATCH] 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: https://github.com/libuv/libuv/commit/f3e0bffcb14 --- lib/os.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/os.js b/lib/os.js index f0f0fdb15f61c0..4d706f542635a2 100644 --- a/lib/os.js +++ b/lib/os.js @@ -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; }