Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
more robust close of output file
b2gills++
  • Loading branch information
coke committed Jan 7, 2019
1 parent 795cf17 commit de61a0a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Pod/Cache.pm6
Expand Up @@ -13,12 +13,12 @@ method cache-file(Str $file --> Str) {
if $in-time > $out-time {
mkdir $output-io.dirname;
my $outfile = $output-io.open(:w);
LEAVE $outfile.close;
$outfile.lock;
my $job = Proc::Async.new($*EXECUTABLE-NAME, '--doc', $file);
$job.stdout.tap(-> $buf {$outfile.print: $buf});

await $job.start;
$outfile.close;
}
$outfile
}

0 comments on commit de61a0a

Please sign in to comment.