MCPcopy
hub / github.com/actions/cache / saveRun

Function saveRun

src/saveImpl.ts:110–128  ·  view source on GitHub ↗
(earlyExit?: boolean | undefined)

Source from the content-addressed store, hash-verified

108}
109
110export async function saveRun(earlyExit?: boolean | undefined): Promise<void> {
111 try {
112 await saveImpl(new StateProvider());
113 } catch (err) {
114 console.error(err);
115 if (earlyExit) {
116 process.exit(1);
117 }
118 }
119
120 // node will stay alive if any promises are not resolved,
121 // which is a possibility if HTTP requests are dangling
122 // due to retries or timeouts. We know that if we got here
123 // that all promises that we care about have successfully
124 // resolved, so simply exit with success.
125 if (earlyExit) {
126 process.exit(0);
127 }
128}

Callers 2

save.tsFile · 0.90
save.test.tsFile · 0.85

Calls 1

saveImplFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…