MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / discard

Function discard

pkg/npm/install.js:295–298  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

293 // Discard the partial file once its handle is closed (Windows refuses
294 // to unlink an open file), then report the failure.
295 const discard = () => {
296 try { fs.unlinkSync(dest); } catch (_) { /* nothing was written */ }
297 finish(err);
298 };
299 if (file.closed) discard();
300 else file.once('close', discard);
301 });

Callers 1

downloadHopFunction · 0.85

Calls 1

finishFunction · 0.70

Tested by

no test coverage detected