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

Function restoreBinaryBackups

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

Source from the content-addressed store, hash-verified

508}
509
510function restoreBinaryBackups(destDir, backups) {
511 for (const name of [WINDOWS_BINARY_NAME]) {
512 const backup = backups.get(name);
513 const target = path.join(destDir, name);
514 if (!backup || fs.existsSync(target)) continue;
515 try { fs.renameSync(backup, target); } catch (_) { /* preserve backup */ }
516 }
517}
518
519function installWindowsBinaryAtomically(sourceDir, destDir, verifier = verifyCandidate) {
520 // Authenticate the source binary before it can contend for the cache.

Callers 1

Calls 1

getMethod · 0.65

Tested by

no test coverage detected