From 25a90294ad15d667a86a54dfac598bca6756c388 Mon Sep 17 00:00:00 2001 From: "U-NEWCASTLE\\natha" Date: Tue, 26 Dec 2023 18:33:51 -0800 Subject: [PATCH] Add mingw support to npm package --- npm/binary.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/npm/binary.js b/npm/binary.js index 96fc5ac..32d0c28 100644 --- a/npm/binary.js +++ b/npm/binary.js @@ -7,7 +7,8 @@ const getPlatform = () => { const type = os.type(); const arch = os.arch(); - if (type === "Windows_NT" && arch === "x64") { + // https://github.com/nodejs/node/blob/c3664227a83cf009e9a2e1ddeadbd09c14ae466f/deps/uv/src/win/util.c#L1566-L1573 + if ((type === "Windows_NT" || type.startsWith("MINGW32_NT-")) && arch === "x64") { return windows; } if (type === "Linux" && arch === "x64") {