(backupRoot, requiredVersion, previousVersion)
| 422 | } |
| 423 | |
| 424 | function _writeForceUpdateRecoveryJournal(backupRoot, requiredVersion, previousVersion) { |
| 425 | var journal = { |
| 426 | state: 'precommit', |
| 427 | requiredVersion: String(requiredVersion || ''), |
| 428 | previousVersion: String(previousVersion || ''), |
| 429 | createdAt: Date.now(), |
| 430 | }; |
| 431 | fs.writeFileSync( |
| 432 | path.join(backupRoot, FORCE_UPDATE_JOURNAL_FILE), |
| 433 | JSON.stringify(journal), |
| 434 | { encoding: 'utf8', mode: 0o600 }, |
| 435 | ); |
| 436 | } |
| 437 | |
| 438 | function _removeInstallEntryIfPresent(entryPath) { |
| 439 | _retryFsLockOperation(function () { |
no outgoing calls
no test coverage detected