Skip to content

Commit

Permalink
fix dangling post-save (#598)
Browse files Browse the repository at this point in the history
  • Loading branch information
laughedelic authored Apr 7, 2024
1 parent 0938be4 commit 1f647d4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/save.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ async function doRun(): Promise<void> {
const msg = err instanceof Error ? err.message : String(err)
core.info(`[warning] Caught ${msg}, ignoring it`)
}

// Explicit termination to make sure we don't hang with some dangling promises.
// Same as https://github.com/actions/cache/blob/0c45773b623bea8c8e75f6c82b208c3cf94ea4f9/src/saveImpl.ts#L116-L123
core.info('All caches saved')
process.exit(0)
}

doRun()

0 comments on commit 1f647d4

Please sign in to comment.