From 19cfefee5bd177bff80095db9d4006293e70301c Mon Sep 17 00:00:00 2001 From: Byron Jones Date: Tue, 21 Jul 2015 15:58:11 +0800 Subject: Bug 1185852 - sentry.pl should build lazily build the head --- sentry.pl | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'sentry.pl') 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; -- cgit v1.2.3-24-g4f1b