MCPcopy Index your code
hub / github.com/di-sukharev/opencommit / shutdownWithAction

Function shutdownWithAction

out/cli.cjs:13159–13173  ·  view source on GitHub ↗
(action, originalIsError, originalError)

Source from the content-addressed store, hash-verified

13157 }
13158 }
13159 function shutdownWithAction(action, originalIsError, originalError) {
13160 if (shuttingDown) {
13161 return;
13162 }
13163 shuttingDown = true;
13164 if (dest._state === "writable" && !WritableStreamCloseQueuedOrInFlight(dest)) {
13165 uponFulfillment(waitForWritesToFinish(), doTheRest);
13166 } else {
13167 doTheRest();
13168 }
13169 function doTheRest() {
13170 uponPromise(action(), () => finalize(originalIsError, originalError), (newError) => finalize(true, newError));
13171 return null;
13172 }
13173 }
13174 function shutdown(isError2, error) {
13175 if (shuttingDown) {
13176 return;

Callers 1

ReadableStreamPipeToFunction · 0.85

Calls 4

uponFulfillmentFunction · 0.85
waitForWritesToFinishFunction · 0.85
doTheRestFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…