summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xsentry.pl11
1 files changed, 6 insertions, 5 deletions
diff --git a/sentry.pl b/sentry.pl
index 3dbc6f489..f5c05f613 100755
--- a/sentry.pl
+++ b/sentry.pl
@@ -18,14 +18,15 @@ use warnings;
BEGIN {
delete $ENV{SERVER_SOFTWARE};
-}
-use FindBin qw($Bin);
-use lib $Bin;
-use lib "$Bin/lib";
+ # exit early if there's nothing to send
+ use FindBin qw($Bin);
+ use lib $Bin, "$Bin/lib";
+ use Bugzilla::Constants;
+ exit(0) unless glob(bz_locations()->{error_reports} . '/*.dump');
+}
use Bugzilla;
-use Bugzilla::Constants;
use Fcntl qw(:flock);
use File::Slurp qw(read_file);
use HTTP::Request::Common;