Skip to content

Commit 9b71657

Browse files
authored
Add comment to clarify process.exit(0) (#161)
Copied from actions/cache#1217
1 parent caf0cab commit 9b71657

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

dist/save-cache/index.js

+5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/save-cache.ts

+5
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ export async function run(): Promise<void> {
2020
const err = error as Error;
2121
core.setFailed(err.message);
2222
}
23+
// node will stay alive if any promises are not resolved,
24+
// which is a possibility if HTTP requests are dangling
25+
// due to retries or timeouts. We know that if we got here
26+
// that all promises that we care about have successfully
27+
// resolved, so simply exit with success.
2328
process.exit(0);
2429
}
2530

0 commit comments

Comments
 (0)