Skip to content

Commit

Permalink
Copy single file patch result even on failure
Browse files Browse the repository at this point in the history
  • Loading branch information
jpenilla committed Dec 20, 2024
1 parent bc640f6 commit da6b698
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,13 @@ abstract class ApplySingleFilePatches : BaseTask() {
.rejectsPath(tmpRej)
.build()

if (op.operate().exit != 0) {
return@use "Patch failed on ${patch.patchFile.path}, see log above. Rejects at $tmpRej"
}
val result = op.operate()

workFile.copyTo(patch.outputFile.path.createParentDirectories(), true)

if (result.exit != 0) {
return@use "Patch failed on ${patch.patchFile.path}, see log above. Rejects at $tmpRej"
}
} else {
upstream.path.resolve(patch.path.get())
.copyTo(patch.outputFile.path.createParentDirectories(), true)
Expand Down

0 comments on commit da6b698

Please sign in to comment.