Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Make precompilation errors non-fatal
Closing the output handle of a failed command throws a failure. Since
precompile should fail non-fatally, we have to check the return value of
the close call.
  • Loading branch information
niner committed Nov 15, 2015
1 parent 06f21ba commit d8a1658
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/core/CompUnit/PrecompilationRepository.pm
Expand Up @@ -64,10 +64,9 @@ RAKUDO_MODULE_DEBUG("Precomping with %*ENV<RAKUDO_PRECOMP_WITH>")

my $result = '';
$result ~= $_ for $proc.out.lines;
$proc.out.close;
self.store.unlock;
if $proc.status -> $status { # something wrong
$result ~= "Return status $status\n";
if not $proc.out.close or $proc.status { # something wrong
$result ~= "Return status $proc.status\n";
fail $result if $result;
}
note $result if $result;
Expand Down

0 comments on commit d8a1658

Please sign in to comment.