S3Backup: check for bzip2 and xz Nix Config support (Use of uninitialized value ::Config::xz in concatenation)

This commit is contained in:
Graham Christensen 2021-10-19 21:50:13 -04:00
parent bf692c9e8c
commit 31cf249aed

View file

@ -21,11 +21,18 @@ sub isEnabled {
} }
my $client; my $client;
my %compressors = ( my %compressors = ();
xz => "| $Nix::Config::xz",
bzip2 => "| $Nix::Config::bzip2", $compressors{"none"} = "";
none => ""
); if (defined($Nix::Config::bzip2)) {
$compressors{"bzip2"} = "| $Nix::Config::bzip2",
}
if (defined($Nix::Config::xz)) {
$compressors{"xz"} = "| $Nix::Config::xz",
}
my $lockfile = Hydra::Model::DB::getHydraPath . "/.hydra-s3backup.lock"; my $lockfile = Hydra::Model::DB::getHydraPath . "/.hydra-s3backup.lock";
sub buildFinished { sub buildFinished {