From cbc046edc56d64df13d2079166a3890e6a12d5a3 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 28 Nov 2008 16:53:53 +0000 Subject: [PATCH] --- src/Hydra/lib/Hydra/Controller/Root.pm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Hydra/lib/Hydra/Controller/Root.pm b/src/Hydra/lib/Hydra/Controller/Root.pm index bfcb53a7..156088ea 100644 --- a/src/Hydra/lib/Hydra/Controller/Root.pm +++ b/src/Hydra/lib/Hydra/Controller/Root.pm @@ -669,7 +669,7 @@ sub log :Local { $c->stash->{build} = $build; # !!! should be done in the view (as a TT plugin). - $c->stash->{logtext} = loadLog($build->resultInfo->logfile); + $c->stash->{logtext} = loadLog($c, $build->resultInfo->logfile); } @@ -689,18 +689,19 @@ sub nixlog :Local { $c->stash->{step} = $step; # !!! should be done in the view (as a TT plugin). - $c->stash->{logtext} = loadLog($step->logfile); + $c->stash->{logtext} = loadLog($c, $step->logfile); } sub loadLog { - my ($path) = @_; + my ($c, $path) = @_; die unless defined $path; # !!! quick hack my $pipeline = ($path =~ /.bz2$/ ? "cat $path | bzip2 -d" : "cat $path") - . " | nix-log2xml | xsltproc xsl/mark-errors.xsl - | xsltproc xsl/log2html.xsl - | tail -n +2"; + . " | nix-log2xml | xsltproc " . $c->path_to("xsl/mark-errors.xsl") . " -" + . " | xsltproc " . $c->path_to("xsl/log2html.xsl") . " - | tail -n +2"; return `$pipeline`; }