From eefebe7b40895384c984220b79b9f5e1822528f8 Mon Sep 17 00:00:00 2001 From: Carlos Rodrigues Date: Fri, 22 Dec 2023 08:39:26 +0000 Subject: [PATCH] fix(windows): add windir and C:/Windows as fallback on non-WSL --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 59a3de6..3e1a5af 100644 --- a/index.js +++ b/index.js @@ -169,7 +169,7 @@ const baseOpen = async options => { command = isWsl ? `${mountPoint}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe` - : `${process.env.SYSTEMROOT}\\System32\\WindowsPowerShell\\v1.0\\powershell`; + : `${process.env.SYSTEMROOT || process.env.windir || 'C:\\Windows'}\\System32\\WindowsPowerShell\\v1.0\\powershell`; cliArguments.push( '-NoProfile',