Skip to content

Commit

Permalink
Explicitly exit the process to not wait for hanging promises
Browse files Browse the repository at this point in the history
As with other actions like setup-node, I'm seeing 2-4 minute delays in post cache actions lately. Apparently this is because of a change in node behavior: ruby/setup-ruby#543 (comment)

The fix, as with other actions, is to explicitly exit so as not to wait for hanging promises.
  • Loading branch information
kamatsuoka authored Mar 20, 2024
1 parent 327261f commit 488c25c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/setup-pdm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ async function run(): Promise<void> {
catch (error: any) {
core.setFailed(error.message)
}
// Explicit process.exit() to not wait for hanging promises,
// see https://github.com/actions/setup-node/issues/878
process.exit()
}

run()

0 comments on commit 488c25c

Please sign in to comment.