From 02b3ff966159dda2426c4be5d28bd0cc35395d29 Mon Sep 17 00:00:00 2001 From: Kenji Matsuoka Date: Mon, 1 Apr 2024 14:09:10 -0700 Subject: [PATCH] move process.exit() to cache-save.ts --- dist/cache-save.js | 1 + dist/setup-pdm.js | 1 - src/cache-save.ts | 3 +++ src/setup-pdm.ts | 3 --- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dist/cache-save.js b/dist/cache-save.js index 9116635..dd85581 100644 --- a/dist/cache-save.js +++ b/dist/cache-save.js @@ -74843,6 +74843,7 @@ async function run() { const err = error; core.setFailed(err.message); } + process.exit(); } async function saveCache2() { const cachePaths = JSON.parse(core.getState("cache-paths")); diff --git a/dist/setup-pdm.js b/dist/setup-pdm.js index 90b86a1..178f70d 100644 --- a/dist/setup-pdm.js +++ b/dist/setup-pdm.js @@ -91128,7 +91128,6 @@ async function run() { } catch (error2) { core8.setFailed(error2.message); } - import_node_process4.default.exit(); } run(); /*! Bundled license information: diff --git a/src/cache-save.ts b/src/cache-save.ts index f039b50..ed769ca 100644 --- a/src/cache-save.ts +++ b/src/cache-save.ts @@ -12,6 +12,9 @@ async function run() { const err = error as Error core.setFailed(err.message) } + // Explicit process.exit() to not wait for hanging promises, + // see https://github.com/actions/setup-node/issues/878 + process.exit() } async function saveCache() { diff --git a/src/setup-pdm.ts b/src/setup-pdm.ts index 6f5d301..df219b8 100644 --- a/src/setup-pdm.ts +++ b/src/setup-pdm.ts @@ -67,9 +67,6 @@ 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()