* Fix getBuildLog for bzip2'd files.

This commit is contained in:
Rob Vermaas 2012-06-26 08:04:35 +02:00
parent 2aa52131ac
commit 0701cd0da8

View file

@ -30,7 +30,10 @@ sub scmPath {
sub getBuildLog { sub getBuildLog {
my ($drvPath) = @_; my ($drvPath) = @_;
my $logPath = ($ENV{NIX_LOG_DIR} || "/nix/var/log/nix"). "/drvs/" . basename $drvPath; my $logPath = ($ENV{NIX_LOG_DIR} || "/nix/var/log/nix"). "/drvs/" . basename $drvPath;
return -e $logPath ? $logPath : undef; return $logPath if -e $logPath;
$logPath = "$logPath.bz2";
return $logPath if -e $logPath;
return undef;
} }