From 3fa3e6414c9d5457efc2473ceafac4190a8a2076 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 9 Oct 2015 15:06:57 +0200 Subject: [PATCH] Fix "Use of uninitialized value $mode" --- src/lib/Hydra/Controller/Build.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/Hydra/Controller/Build.pm b/src/lib/Hydra/Controller/Build.pm index 0ab0832e..7fc66b61 100644 --- a/src/lib/Hydra/Controller/Build.pm +++ b/src/lib/Hydra/Controller/Build.pm @@ -134,6 +134,7 @@ sub view_log : Chained('buildChain') PathPart('log') { sub showLog { my ($c, $mode, $finished, $drvPath, @outPaths) = @_; + $mode //= "pretty"; my $logPath = findLog($c, $drvPath, @outPaths); @@ -146,7 +147,7 @@ sub showLog { || (($mode eq "tail" || $mode eq "tail-reload") && $logPath !~ /\.bz2$/) || $size < 64 * 1024 * 1024; - if (!$mode) { + if ($mode eq "pretty") { # !!! quick hack my $pipeline = ($logPath =~ /.bz2$/ ? "bzip2 -d < $logPath" : "cat $logPath") . " | nix-log2xml | xsltproc " . $c->path_to("xsl/mark-errors.xsl") . " -"