Skip to content

Commit

Permalink
Add Windows environment variable fallback for some broken systems (#328)
Browse files Browse the repository at this point in the history
  • Loading branch information
pikax committed Dec 22, 2023
1 parent 2a8ec70 commit 8e69be4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Expand Up @@ -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',
Expand Down

0 comments on commit 8e69be4

Please sign in to comment.