Skip to content

Commit

Permalink
try: exit or error early
Browse files Browse the repository at this point in the history
  • Loading branch information
deemp committed Apr 2, 2024
1 parent ce8aad7 commit 1574368
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,8 @@ async function run() {
core.setOutput(k, v);
}
});
// https://github.com/actions/cache/blob/0c45773b623bea8c8e75f6c82b208c3cf94ea4f9/src/restoreImpl.ts#L99-L106
process.exit(0)
} catch (error) {
if (error instanceof Error) {
core.error(error);
Expand All @@ -141,6 +143,8 @@ async function run() {
core.error("Non-Error exception");
core.setFailed("Non-Error exception");
}
// https://github.com/actions/cache/blob/0c45773b623bea8c8e75f6c82b208c3cf94ea4f9/src/restoreImpl.ts#L88
process.exit(1)
}
}

Expand Down

0 comments on commit 1574368

Please sign in to comment.