This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
In bisect-runner.pl, make the code to report patching errors more robust.
[perl5.git] / Porting / bisect-runner.pl
index 92e6e2d..44a321b 100755 (executable)
@@ -449,7 +449,7 @@ sub edit_file {
 sub apply_patch {
     my $patch = shift;
 
-    my ($file) = $patch =~ qr!^diff.*a/(\S+) b/\1!;
+    my ($file) = $patch =~ qr!^--- a/(\S+)\n\+\+\+ b/\1!sm;
     open my $fh, '|-', 'patch', '-p1' or die "Can't run patch: $!";
     print $fh $patch;
     return if close $fh;