Skip to content

Commit cd72793

Browse files
Update source so github/no-then passes
1 parent 35fd0a9 commit cd72793

File tree

4 files changed

+40
-16
lines changed

4 files changed

+40
-16
lines changed

src/analyze-action.ts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,13 @@ async function run() {
102102
await sendStatusReport(startedAt, stats);
103103
}
104104

105-
run().catch((e) => {
106-
core.setFailed(`analyze action failed: ${e}`);
107-
console.log(e);
108-
});
105+
async function runWrapper() {
106+
try {
107+
await run();
108+
} catch (error) {
109+
core.setFailed(`analyze action failed: ${error}`);
110+
console.log(error);
111+
}
112+
}
113+
114+
void runWrapper();

src/autobuild-action.ts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,13 @@ async function run() {
8686
await sendCompletedStatusReport(startedAt, language ? [language] : []);
8787
}
8888

89-
run().catch((e) => {
90-
core.setFailed(`autobuild action failed. ${e}`);
91-
console.log(e);
92-
});
89+
async function runWrapper() {
90+
try {
91+
await run();
92+
} catch (error) {
93+
core.setFailed(`autobuild action failed. ${error}`);
94+
console.log(error);
95+
}
96+
}
97+
98+
void runWrapper();

src/init-action.ts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,13 @@ async function run() {
209209
await sendSuccessStatusReport(startedAt, config, toolsVersion);
210210
}
211211

212-
run().catch((e) => {
213-
core.setFailed(`init action failed: ${e}`);
214-
console.log(e);
215-
});
212+
async function runWrapper() {
213+
try {
214+
await run();
215+
} catch (error) {
216+
core.setFailed(`init action failed: ${error}`);
217+
console.log(error);
218+
}
219+
}
220+
221+
void runWrapper();

src/upload-sarif-action.ts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,13 @@ async function run() {
7676
}
7777
}
7878

79-
run().catch((e) => {
80-
core.setFailed(`codeql/upload-sarif action failed: ${e}`);
81-
console.log(e);
82-
});
79+
async function runWrapper() {
80+
try {
81+
await run();
82+
} catch (error) {
83+
core.setFailed(`codeql/upload-sarif action failed: ${error}`);
84+
console.log(error);
85+
}
86+
}
87+
88+
void runWrapper();

0 commit comments

Comments
 (0)