mirror of
https://github.com/actions/setup-dotnet.git
synced 2024-11-25 12:53:06 +07:00
Update listSdks to not fail when dotnet util is not installed
This commit is contained in:
parent
07be99e939
commit
cae98c4b9e
@ -1,13 +1,11 @@
|
||||
import * as exec from '@actions/exec';
|
||||
|
||||
export const listSdks = async () => {
|
||||
const {stdout, exitCode} = await exec.getExecOutput(
|
||||
'dotnet',
|
||||
['--list-sdks'],
|
||||
{
|
||||
const {stdout, exitCode} = await exec
|
||||
.getExecOutput('dotnet', ['--list-sdks'], {
|
||||
ignoreReturnCode: true
|
||||
}
|
||||
);
|
||||
})
|
||||
.catch(() => ({stdout: '', exitCode: 1}));
|
||||
|
||||
if (exitCode) {
|
||||
return [];
|
||||
|
Loading…
Reference in New Issue
Block a user