]> git.ipfire.org Git - thirdparty/public-inbox.git/commitdiff
t/lei-convert: fix uninitialized variable w/o pigz
authorEric Wong <e@80x24.org>
Sat, 30 Sep 2023 16:17:21 +0000 (16:17 +0000)
committerEric Wong <e@80x24.org>
Sun, 1 Oct 2023 07:05:16 +0000 (07:05 +0000)
`backtick` captures return `undef' when a command is missing

Fixes: 5df0446abcca (lei: don't gzip --rsyncable by default for mbox*)
t/lei-convert.t

index d75110cbe4226424695015bb78f6f173cf065624..84b57f81d92f363b4c1dfb3a9ee60ba788207d81 100644 (file)
@@ -132,7 +132,7 @@ test_lei({ tmpdir => $tmpdir }, sub {
        SKIP: {
                my $ok;
                for my $x (($ENV{GZIP}//''), qw(pigz gzip)) {
-                       $x && `$x -h 2>&1` =~ /--rsyncable\b/s or next;
+                       $x && (`$x -h 2>&1`//'') =~ /--rsyncable\b/s or next;
                        $ok = $x;
                        last;
                }