MCPcopy Create free account
hub / github.com/anus-dev/ANUS / onClose

Function onClose

packages/cli/src/utils/sandbox.ts:873–888  ·  view source on GitHub ↗
(code: number | null)

Source from the content-addressed store, hash-verified

871 };
872
873 const onClose = (code: number | null) => {
874 if (code === 0) {
875 console.info(`Successfully pulled image ${image}.`);
876 cleanup();
877 resolve(true);
878 } else {
879 console.warn(
880 `Failed to pull image ${image}. '${sandbox} pull ${image}' exited with code ${code}.`,
881 );
882 if (stderrData.trim()) {
883 // Details already printed by the stderr listener above
884 }
885 cleanup();
886 resolve(false);
887 }
888 };
889
890 const cleanup = () => {
891 if (pullProcess.stdout) {

Callers

nothing calls this directly

Calls 1

cleanupFunction · 0.70

Tested by

no test coverage detected