diff --git a/src/dotnet-utils.ts b/src/dotnet-utils.ts index a4e45b6..6ba1297 100644 --- a/src/dotnet-utils.ts +++ b/src/dotnet-utils.ts @@ -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 [];