using backquote as argument resulted in only first line as first argument to removeAsciiEscapes

This commit is contained in:
Rob Vermaas 2011-06-10 10:48:51 +00:00
parent 48b435c2de
commit 5d166150f9
2 changed files with 4 additions and 2 deletions

View file

@ -55,7 +55,8 @@ sub view_build : Chained('build') PathPart('') Args(0) {
(my $lastBuildStep) = $build->buildsteps->search({},{order_by => "stepnr DESC", rows => 1});
my $path = defined $lastBuildStep ? $lastBuildStep->logfile : "" ;
if (defined $build->resultInfo && ($build->resultInfo->buildstatus == 1 || $build->resultInfo->buildstatus == 6) && !($path eq "") && -f $lastBuildStep->logfile) {
$c->stash->{logtext} = removeAsciiEscapes(`tail -n 50 $path`);
my $logtext = `tail -n 50 $path`;
$c->stash->{logtext} = removeAsciiEscapes($logtext);
}
if($build->finished) {

View file

@ -156,7 +156,8 @@ sub sendEmailNotification {
my $loglines = 50;
my $logfile = $build->resultInfo->logfile;
my $logtext = defined $logfile && -e $logfile ? removeAsciiEscapes(`tail -$loglines $logfile`) : "No logfile available.\n";
my $logtext = defined $logfile && -e $logfile ? `tail -$loglines $logfile` : "No logfile available.\n";
$logtext = removeAsciiEscapes($logtext);
my $body = "Hi,\n"
. "\n"