mirror of
https://code.forgejo.org/actions/cache.git
synced 2025-05-18 13:54:46 +00:00
Consume latest toolkit and fix dangling promise bug
This commit is contained in:
parent
67b839edb6
commit
a29b2aba12
10 changed files with 826 additions and 150 deletions
|
@ -2,7 +2,19 @@ import restoreImpl from "./restoreImpl";
|
|||
import { StateProvider } from "./stateProvider";
|
||||
|
||||
async function run(): Promise<void> {
|
||||
await restoreImpl(new StateProvider());
|
||||
try {
|
||||
await restoreImpl(new StateProvider());
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
// node will stay alive if any promises are not resolved,
|
||||
// which is a possibility if HTTP requests are dangling
|
||||
// due to retries or timeouts. We know that if we got here
|
||||
// that all promises that we care about have successfully
|
||||
// resolved, so simply exit with success.
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
run();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue