diff --git a/dist/index.js b/dist/index.js index d897c56a4..553f9911e 100644 --- a/dist/index.js +++ b/dist/index.js @@ -275,7 +275,7 @@ class DotnetCoreInstaller { command += ` -ProxyBypassList ${process.env['no_proxy']}`; } // process.env must be explicitly passed in for DOTNET_INSTALL_DIR to be used - const powershellPath = yield io.which('powershell', true); + const powershellPath = (yield io.which('pwsh', false)) || (yield io.which('powershell', true)); var options = { listeners: { stdout: (data) => { diff --git a/src/installer.ts b/src/installer.ts index c25d23a0a..d5911d9f2 100644 --- a/src/installer.ts +++ b/src/installer.ts @@ -116,7 +116,8 @@ export class DotnetCoreInstaller { } // process.env must be explicitly passed in for DOTNET_INSTALL_DIR to be used - const powershellPath = await io.which('powershell', true); + const powershellPath = + (await io.which('pwsh', false)) || (await io.which('powershell', true)); var options: ExecOptions = { listeners: {