From 78312ca4cc3143a8415da16ab7d2a651f9ff53b0 Mon Sep 17 00:00:00 2001 From: Alex Jordan Date: Thu, 29 Apr 2021 22:03:26 -0700 Subject: [PATCH] warn if tgz file not created --- lib/TikZImage.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/TikZImage.pm b/lib/TikZImage.pm index 32f76739e3..15ed85d5b2 100644 --- a/lib/TikZImage.pm +++ b/lib/TikZImage.pm @@ -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