Skip to content

Commit

Permalink
committable: handle uncompilable commits properly
Browse files Browse the repository at this point in the history
Also print warnings in exactly the same manner as other output.
  • Loading branch information
AlexDaniel committed Jul 15, 2016
1 parent b04f37b commit 5d7fd25
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions committable.pl
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,15 @@ sub process_message {
for my $commit (@commits) {
# convert to real ids so we can look up the builds
my $full_commit = $self->to_full_commit($commit);
unless (defined $full_commit) {
$msg_response .= "Cannot find revision:$commit ";
next;
my $out = '';
if (not defined $full_commit) {
$out = "Cannot find this revision";
} elsif (not -e $self->BUILDS . "/$full_commit/bin/perl6") {
$out = 'No build for this commit';
} else { # actually run the code
($out, my $exit, my $time) = $self->get_output($self->BUILDS . "/$full_commit/bin/perl6", $filename);
$out .= " exit code = $exit" if ($exit != 0);
}

my ($out, $exit, $time) = $self->get_output($self->BUILDS . "/$full_commit/bin/perl6", $filename);

$out //= '';
$out .= " exit code = $exit" if ($exit != 0);
my $short_commit = substr($commit, 0, 7);

# Code below keeps results in order. Example state:
Expand Down

0 comments on commit 5d7fd25

Please sign in to comment.