mirror of
https://github.com/actions/setup-dotnet.git
synced 2025-08-18 06:35:09 +00:00
update to use pwsh if it is available
This commit is contained in:
parent
fd4e15fa44
commit
6bd8f44edc
5
dist/index.js
vendored
5
dist/index.js
vendored
@ -275,7 +275,10 @@ 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);
|
||||
let powershellPath = yield io.which('pwsh', false);
|
||||
if (powershellPath == '') {
|
||||
powershellPath = yield io.which('powershell', true);
|
||||
}
|
||||
var options = {
|
||||
listeners: {
|
||||
stdout: (data) => {
|
||||
|
@ -116,7 +116,11 @@ export class DotnetCoreInstaller {
|
||||
}
|
||||
|
||||
// process.env must be explicitly passed in for DOTNET_INSTALL_DIR to be used
|
||||
const powershellPath = await io.which('powershell', true);
|
||||
let powershellPath = await io.which('pwsh', false);
|
||||
if (powershellPath == '')
|
||||
{
|
||||
powershellPath = await io.which('powershell', true);
|
||||
}
|
||||
|
||||
var options: ExecOptions = {
|
||||
listeners: {
|
||||
|
Loading…
x
Reference in New Issue
Block a user