Add another hunk to the patch (yet to be applied). Targeting another file in my case.
Run phing apply_patches.
Task prints error due to L52 which halts phing (and no error message).
Verbose output shows that the patch is applied successfully and no error should be thrown.
Seems that L51's expectation for the value of $exec_return is incomplete.
From what I can see, $exec_check_return is 0 when nothing will be applied, and 1 when a change will be applied. And $exec_return is 1 if anything(?) wasn't applied.
It's proven hard to find just what the return values are for patch so not sure what the correct implementation would be. It's not a major issue, just raising for now for the record.
https://github.com/symbiote/silverstripe-build/blob/68bc7d2ef7bd7cd1aa73af8a587539275ab1ef65/ApplyPatchesTask.php#L47-L57
phing apply_patches
.$exec_return
is incomplete.$exec_check_return
is0
when nothing will be applied, and1
when a change will be applied. And$exec_return
is1
if anything(?) wasn't applied.It's proven hard to find just what the return values are for
patch
so not sure what the correct implementation would be. It's not a major issue, just raising for now for the record.