(destDir, backups)
| 508 | } |
| 509 | |
| 510 | function 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 | |
| 519 | function installWindowsBinaryAtomically(sourceDir, destDir, verifier = verifyCandidate) { |
| 520 | // Authenticate the source binary before it can contend for the cache. |
no test coverage detected