Skip to content

Commit

Permalink
Showing 4 changed files with 40 additions and 16 deletions.
14 changes: 10 additions & 4 deletions src/analyze-action.ts
@@ -102,7 +102,13 @@ async function run() {
await sendStatusReport(startedAt, stats);
}

run().catch((e) => {
core.setFailed(`analyze action failed: ${e}`);
console.log(e);
});
async function runWrapper() {
try {
await run();
} catch (error) {
core.setFailed(`analyze action failed: ${error}`);
console.log(error);
}
}

void runWrapper();
14 changes: 10 additions & 4 deletions src/autobuild-action.ts
@@ -86,7 +86,13 @@ async function run() {
await sendCompletedStatusReport(startedAt, language ? [language] : []);
}

run().catch((e) => {
core.setFailed(`autobuild action failed. ${e}`);
console.log(e);
});
async function runWrapper() {
try {
await run();
} catch (error) {
core.setFailed(`autobuild action failed. ${error}`);
console.log(error);
}
}

void runWrapper();
14 changes: 10 additions & 4 deletions src/init-action.ts
@@ -209,7 +209,13 @@ async function run() {
await sendSuccessStatusReport(startedAt, config, toolsVersion);
}

run().catch((e) => {
core.setFailed(`init action failed: ${e}`);
console.log(e);
});
async function runWrapper() {
try {
await run();
} catch (error) {
core.setFailed(`init action failed: ${error}`);
console.log(error);
}
}

void runWrapper();
14 changes: 10 additions & 4 deletions src/upload-sarif-action.ts
@@ -76,7 +76,13 @@ async function run() {
}
}

run().catch((e) => {
core.setFailed(`codeql/upload-sarif action failed: ${e}`);
console.log(e);
});
async function runWrapper() {
try {
await run();
} catch (error) {
core.setFailed(`codeql/upload-sarif action failed: ${error}`);
console.log(error);
}
}

void runWrapper();

0 comments on commit cd72793

Please sign in to comment.