From 8e17a413f53de3b38bad97bdee26ae1656f6e038 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 1 Aug 2018 17:17:46 +0200 Subject: [PATCH] hydra-notify step-finished: Don't barf if the step has no log file --- src/script/hydra-notify | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/script/hydra-notify b/src/script/hydra-notify index 9cbc885f..83963731 100755 --- a/src/script/hydra-notify +++ b/src/script/hydra-notify @@ -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); };