Skip to content

Commit 8e69be4

Browse files
authoredDec 22, 2023
Add Windows environment variable fallback for some broken systems (#328)
1 parent 2a8ec70 commit 8e69be4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ const baseOpen = async options => {
169169

170170
command = isWsl
171171
? `${mountPoint}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`
172-
: `${process.env.SYSTEMROOT}\\System32\\WindowsPowerShell\\v1.0\\powershell`;
172+
: `${process.env.SYSTEMROOT || process.env.windir || 'C:\\Windows'}\\System32\\WindowsPowerShell\\v1.0\\powershell`;
173173

174174
cliArguments.push(
175175
'-NoProfile',

0 commit comments

Comments
 (0)
Please sign in to comment.