Add comment to clarify process.exit(0) (#161)

Copied from https://github.com/actions/cache/pull/1217
This commit is contained in:
Kevin Stillhammer 2024-11-23 11:58:21 +01:00 committed by GitHub
parent caf0cab7a6
commit 9b71657bb2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 0 deletions

5
dist/save-cache/index.js generated vendored
View File

@ -82523,6 +82523,11 @@ function run() {
const err = error;
core.setFailed(err.message);
}
// 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);
});
}

View File

@ -20,6 +20,11 @@ export async function run(): Promise<void> {
const err = error as Error;
core.setFailed(err.message);
}
// 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);
}