From a351d9ea84bc76ec7508debf02a39d88f8b6c0c0 Mon Sep 17 00:00:00 2001 From: Thomas Boop <52323235+thboop@users.noreply.github.com> Date: Mon, 26 Sep 2022 04:12:13 -0400 Subject: [PATCH] Add support for Windows-arm (#320) * update to use pwsh if it is available * fix spacing * update install script * Update src/installer.ts Co-authored-by: Ivan <98037481+IvanZosimov@users.noreply.github.com> * update index.js * fix format Co-authored-by: Ivan <98037481+IvanZosimov@users.noreply.github.com> --- dist/index.js | 2 +- src/installer.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/dist/index.js b/dist/index.js index d897c56..553f991 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 c25d23a..d5911d9 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: {