hydra-notify step-finished: Don't barf if the step has no log file

This commit is contained in:
Eelco Dolstra 2018-08-01 17:17:46 +02:00
parent dca6c5a983
commit 8e17a413f5
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE

View file

@ -61,10 +61,12 @@ elsif ($cmd eq "build-started") {
}
elsif ($cmd eq "step-finished") {
my $stepNr = shift @ARGV or die;
die if scalar @ARGV < 2;
my $stepNr = shift @ARGV;
my $step = $build->buildsteps->find({stepnr => $stepNr})
or die "step $stepNr does not exist\n";
my $logPath = shift @ARGV or die;
my $logPath = shift @ARGV;
$logPath = undef if $logPath eq "";
foreach my $plugin (@plugins) {
eval { $plugin->stepFinished($step, $logPath); };