Fix UTF-8 handling of log files

This commit is contained in:
Eelco Dolstra
2014-08-13 18:53:29 +02:00
parent a2b27c7cf2
commit 42b23133e8
4 changed files with 9 additions and 7 deletions

View File

@ -8,6 +8,7 @@ use Config::General;
use Hydra::Helper::CatalystUtils;
use Hydra::Model::DB;
use Nix::Store;
use Encode;
our @ISA = qw(Exporter);
our @EXPORT = qw(
@ -310,7 +311,7 @@ sub logContents {
else {
$cmd = defined $tail ? "tail -$tail $logPath" : "cat $logPath";
}
return `$cmd`;
return decode("utf-8", `$cmd`);
}