Move the complete step into a finally block

This commit is contained in:
Graham Christensen 2024-04-11 10:18:29 -04:00
parent 6c4294ed2c
commit 8c4a891060
3 changed files with 15 additions and 7 deletions

5
dist/index.js generated vendored
View file

@ -98330,10 +98330,13 @@ async function main() {
}
}
catch (error) {
if (error instanceof Error)
if (error instanceof Error) {
core.setFailed(error);
}
}
finally {
await installer.idslib.complete();
}
}
// eslint-disable-next-line github/no-then
main().catch((error) => {

5
dist/main.js generated vendored
View file

@ -793,10 +793,13 @@ async function main() {
}
}
catch (error) {
if (error instanceof Error)
if (error instanceof Error) {
actions_core.setFailed(error);
}
}
finally {
await installer.idslib.complete();
}
}
// eslint-disable-next-line github/no-then
main().catch((error) => {

View file

@ -1035,10 +1035,12 @@ async function main(): Promise<void> {
await installer.report_overall();
}
} catch (error) {
if (error instanceof Error) actions_core.setFailed(error);
if (error instanceof Error) {
actions_core.setFailed(error);
}
} finally {
await installer.idslib.complete();
}
}
// eslint-disable-next-line github/no-then