feat: Explicitly exit the process to not wait for hanging promises (#51)

* 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.

* transpiled
This commit is contained in:
Kenji Matsuoka 2024-03-21 19:41:40 -07:00 committed by GitHub
parent 327261f959
commit 7d10bd0f83
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 0 deletions

1
dist/setup-pdm.js vendored
View File

@ -91128,6 +91128,7 @@ async function run() {
} catch (error2) {
core8.setFailed(error2.message);
}
import_node_process4.default.exit();
}
run();
/*! Bundled license information:

View File

@ -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()