Merge branch 'main' into ADRdotnet

This commit is contained in:
IvanZosimov 2022-09-26 10:42:13 +02:00
commit 890cbe1576
2 changed files with 4 additions and 2 deletions

3
dist/index.js vendored
View File

@ -335,7 +335,8 @@ class DotnetCoreInstaller {
}
scriptArguments.push(`-InstallDir '${DotnetCoreInstaller.installationDirectoryWindows}'`);
// process.env must be explicitly passed in for DOTNET_INSTALL_DIR to be used
scriptPath = yield io.which('powershell', true);
scriptPath =
(yield io.which('pwsh', false)) || (yield io.which('powershell', true));
scriptArguments = [...windowsDefaultOptions, scriptArguments.join(' ')];
}
else {

View File

@ -209,7 +209,8 @@ export class DotnetCoreInstaller {
`-InstallDir '${DotnetCoreInstaller.installationDirectoryWindows}'`
);
// process.env must be explicitly passed in for DOTNET_INSTALL_DIR to be used
scriptPath = await io.which('powershell', true);
scriptPath =
(await io.which('pwsh', false)) || (await io.which('powershell', true));
scriptArguments = [...windowsDefaultOptions, scriptArguments.join(' ')];
} else {
chmodSync(escapedScript, '777');