From f5e33bc69b5077db144e5357dacfc92db5c4c21c Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Mon, 29 Dec 2025 00:04:22 +0100 Subject: [PATCH] node compatibility fixes --- lib/util.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/util.js b/lib/util.js index a5aa90c..a3c147e 100644 --- a/lib/util.js +++ b/lib/util.js @@ -510,7 +510,7 @@ function powerShell(cmd) { try { const osVersion = os.release().split('.').map(Number); const spanOptions = - osVersion[0] < 10 + osVersion[0] < 0 ? ['-NoProfile', '-NoLogo', '-InputFormat', 'Text', '-NoExit', '-ExecutionPolicy', 'Unrestricted', '-Command', '-'] : ['-NoProfile', '-NoLogo', '-InputFormat', 'Text', '-ExecutionPolicy', 'Unrestricted', '-Command', cmd]; const child = spawn(_powerShell, spanOptions, { @@ -543,7 +543,7 @@ function powerShell(cmd) { child.kill(); resolve(result); }); - if (osVersion[0] < 10) { + if (osVersion[0] < 0) { try { child.stdin.write(_psToUTF8 + cmd + os.EOL); child.stdin.write('exit' + os.EOL);