Skip to content

Commit

Permalink
Migration will now report head and script failures
Browse files Browse the repository at this point in the history
  • Loading branch information
BenSurgisonGDS committed Dec 19, 2022
1 parent e4dac2e commit d5b1ac5
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions lib/migrator/migrationSteps.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,18 +199,15 @@ module.exports.upgradeIfUnchanged = (filePaths, starterFilePath, additionalStep)

const reporter = await addReporter(`Overwrite ${filePath}`)

if (!matchFound) {
await reporter(false)
return false
}

let result = false
try {
await copyFileFromStarter(starterFilePath || filePath, filePath)
if (matchFound) {
await copyFileFromStarter(starterFilePath || filePath, filePath)
}
if (additionalStep) {
result = await additionalStep()
} else {
result = true
result = matchFound
}
} catch (e) {
await verboseLog(e.message)
Expand Down

0 comments on commit d5b1ac5

Please sign in to comment.