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

Function restoreBinaryBackups

pkg/npm/install.js:372–379  ·  view source on GitHub ↗
(destDir, backups)

Source from the content-addressed store, hash-verified

370}
371
372function restoreBinaryBackups(destDir, backups) {
373 for (const name of [WINDOWS_BINARY_NAME]) {
374 const backup = backups.get(name);
375 const target = path.join(destDir, name);
376 if (!backup || fs.existsSync(target)) continue;
377 try { fs.renameSync(backup, target); } catch (_) { /* preserve backup */ }
378 }
379}
380
381function installWindowsBinaryAtomically(sourceDir, destDir, verifier = verifyCandidate) {
382 // Authenticate the source binary before it can contend for the cache.

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected