From b09150e75061d79a6e7cf42bf56ef3d5d38aef7a Mon Sep 17 00:00:00 2001 From: Rabah Ghodbane Date: Wed, 11 Jan 2023 08:43:44 +0100 Subject: [PATCH] use uppercase env variable names --- lib/engine.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/engine.js b/lib/engine.js index a5f7281..66bb9a2 100644 --- a/lib/engine.js +++ b/lib/engine.js @@ -12,7 +12,7 @@ const path = require('path'); // Variable const archx64 = arch() === 'x64'; -const sysroot = process.env['systemroot'] || process.env['windir']; +const sysroot = process.env['SYSTEMROOT'] || process.env['WINDIR']; const cscript32 = path.join(sysroot, archx64 ? 'SysWOW64' : 'System32', 'cscript.exe'); const cscript64 = path.join(sysroot, 'System32/cscript.exe'); @@ -21,7 +21,7 @@ const cscript64 = path.join(sysroot, 'System32/cscript.exe'); * @param {boolean} x64 * @returns {string} */ -module.exports = x64 => { +module.exports = (x64) => { if (x64) return cscript64; return cscript32;