From 568ddd69406b30de1774ec0044b73ae06e716aa4 Mon Sep 17 00:00:00 2001 From: Kenji Matsuoka Date: Thu, 18 Apr 2024 00:41:39 -0700 Subject: [PATCH] fix: move process.exit() to cache-save.ts (#53) --- 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()