Skip to content

Commit

Permalink
warn if tgz file not created
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex-Jordan committed Apr 30, 2021
1 parent fedb0bc commit 78312ca
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/TikZImage.pm
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,9 @@ sub draw {

# Make the tgz
if ($ext eq 'tgz') {
my $tar = WeBWorK::PG::IO::externalCommand('tar');
system "cd $working_dir && $tar -czf image.tgz image.tex image.pdf image.svg image.png > /dev/null 2>&1";
system "cd $working_dir && " . WeBWorK::PG::IO::externalCommand('tar') .
" -czf image.tgz image.tex image.pdf image.svg image.png > /dev/null 2>&1";
warn "Failed to generate tgz file." unless -r "$working_dir/image.tgz";
}

# Read the generated image file into memory
Expand Down

0 comments on commit 78312ca

Please sign in to comment.