Skip to content

Commit

Permalink
bugfix: .precomp returning Failure erroneously
Browse files Browse the repository at this point in the history
On JVM the pipe must be closed after reading but before the status is checked for `.precomp` to return a true value.

side note: It would seem `process.waitFor()` does not close the channel, as if it never finishes reading the buffer.
  • Loading branch information
ugexe committed Jul 2, 2015
1 parent 9b4463d commit 9e4f8bd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/core/CompUnit.pm
Expand Up @@ -130,6 +130,7 @@ RAKUDO_MODULE_DEBUG("Precomping with %*ENV<RAKUDO_PRECOMP_WITH>")

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

0 comments on commit 9e4f8bd

Please sign in to comment.