Update src/installer.ts

Co-authored-by: Ivan <98037481+IvanZosimov@users.noreply.github.com>
This commit is contained in:
Thomas Boop 2022-09-22 09:45:47 -04:00 committed by GitHub
parent 9cf8ed9671
commit 94bf0052b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -116,10 +116,7 @@ export class DotnetCoreInstaller {
}
// process.env must be explicitly passed in for DOTNET_INSTALL_DIR to be used
let powershellPath = await io.which('pwsh', false);
if (powershellPath == '') {
powershellPath = await io.which('powershell', true);
}
const powershellPath = await io.which('pwsh', false) || await io.which('powershell', true);
var options: ExecOptions = {
listeners: {