Skip to content

Commit

Permalink
Update listSdks to not fail when dotnet util is not installed
Browse files Browse the repository at this point in the history
  • Loading branch information
nikolai-laevskii committed Sep 4, 2023
1 parent 07be99e commit cae98c4
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/dotnet-utils.ts
Original file line number Diff line number Diff line change
@@ -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 [];
Expand Down

0 comments on commit cae98c4

Please sign in to comment.