From 488c25c271981a87efe3c7a19bb5d72073864506 Mon Sep 17 00:00:00 2001 From: Kenji Matsuoka Date: Wed, 20 Mar 2024 12:00:25 -0700 Subject: [PATCH] Explicitly exit the process to not wait for hanging promises 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: https://github.com/ruby/setup-ruby/issues/543#issuecomment-1793608370 The fix, as with other actions, is to explicitly exit so as not to wait for hanging promises. --- src/setup-pdm.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/setup-pdm.ts b/src/setup-pdm.ts index df219b8..6f5d301 100644 --- a/src/setup-pdm.ts +++ b/src/setup-pdm.ts @@ -67,6 +67,9 @@ async function run(): Promise { 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()