Skip to content

Commit

Permalink
fix(windows): add windir and C:/Windows as fallback on non-WSL
Browse files Browse the repository at this point in the history
  • Loading branch information
pikax committed Dec 22, 2023
1 parent 2a8ec70 commit eefebe7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
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 eefebe7

Please sign in to comment.