Skip to content

Commit c535eee

Browse files
committed
Avoid LAST to work around some weird issue
Sometimes when run-bisect runs from multiple threads at the same time I am getting Nil in string context warnings. To me that can only mean that `$result<output>` is not what it is supposed to be, so there's a bug in rakudo. Working around it because I want to move on right now. Please feel free to investigate.
1 parent 9392cbb commit c535eee

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/Whateverable/Bisection.pm6

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ sub run-bisect(&runner = &standard-runner, #← Something to run on every revi
5656
$status = $result<exit-code>;
5757
if $result<output> ~~ /^^ (\S+) ‘ is the first new commit’ / {
5858
$first-new-commit = ~$0;
59+
take $result<output>;
5960
last
6061
}
6162
if $status == 2 {
@@ -64,10 +65,13 @@ sub run-bisect(&runner = &standard-runner, #← Something to run on every revi
6465
my @possible-revs = get-output(:cwd($repo-cwd), <git rev-list>,
6566
<refs/bisect/new --not>, |$good-revs.lines)<output>.lines;
6667
$first-new-commit = @possible-revs;
68+
take $result<output>;
69+
last
70+
}
71+
if $status0 {
72+
take $result<output>;
6773
last
6874
}
69-
last if $status0;
70-
LAST take $result<output>
7175
}
7276
my $log = @bisect-log.join(\n);
7377
%( :$log, :$status, :$first-new-commit )

0 commit comments

Comments
 (0)