Skip to content

Commit

Permalink
Add comment to clarify process.exit(0) (#161)
Browse files Browse the repository at this point in the history
Copied from actions/cache#1217
  • Loading branch information
eifinger authored Nov 23, 2024
1 parent caf0cab commit 9b71657
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions dist/save-cache/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions src/save-cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 9b71657

Please sign in to comment.