File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -73,10 +73,12 @@ export function getDefaultPowerShellPath(
73
73
if ( platformDetails . operatingSystem === OperatingSystem . Windows ) {
74
74
if ( use32Bit ) {
75
75
psCoreInstallPath =
76
- ( platformDetails . isProcess64Bit ? process . env . ProgramW6432 : process . env . ProgramFiles ) + "\\PowerShell" ;
76
+ ( platformDetails . isProcess64Bit ? process . env [ 'ProgramFiles(x86)' ] : process . env . ProgramFiles )
77
+ + "\\PowerShell" ;
77
78
} else {
78
79
79
- psCoreInstallPath = psCoreInstallPath = process . env . ProgramFiles + "\\PowerShell" ;
80
+ psCoreInstallPath =
81
+ ( platformDetails . isProcess64Bit ? process . env . ProgramFiles : process . env . ProgramW6432 ) + "\\PowerShell" ;
80
82
}
81
83
if ( fs . existsSync ( psCoreInstallPath ) ) {
82
84
const arch = platformDetails . isProcess64Bit ? "(x64)" : "(x86)" ;
You can’t perform that action at this time.
0 commit comments