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';
|
import * as exec from '@actions/exec';
|
||||||
|
|
||||||
export const listSdks = async () => {
|
export const listSdks = async () => {
|
||||||
const {stdout, exitCode} = await exec.getExecOutput(
|
const {stdout, exitCode} = await exec
|
||||||
'dotnet',
|
.getExecOutput('dotnet', ['--list-sdks'], {
|
||||||
['--list-sdks'],
|
|
||||||
{
|
|
||||||
ignoreReturnCode: true
|
ignoreReturnCode: true
|
||||||
}
|
})
|
||||||
);
|
.catch(() => ({stdout: '', exitCode: 1}));
|
||||||
|
|
||||||
if (exitCode) {
|
if (exitCode) {
|
||||||
return [];
|
return [];
|
||||||
|
Loading…
Reference in New Issue
Block a user