]> Sergey Matveev's repositories - public-inbox.git/commitdiff
lei q: fix arbitrary --mua command handling
authorEric Wong <e@80x24.org>
Sun, 7 Feb 2021 10:40:02 +0000 (09:40 -0100)
committerEric Wong <e@80x24.org>
Mon, 8 Feb 2021 08:54:58 +0000 (08:54 +0000)
Perl doesn't seem to warn for shadowed variables, here :x

lib/PublicInbox/LEI.pm

index 31e6b4a8e407a01a7fb56379b480fe3078c216d8..dce8076282d1c62bcd6d182713231c0bc3852b3b 100644 (file)
@@ -731,7 +731,7 @@ sub start_mua {
        # TODO: help wanted: other common FOSS MUAs
        } else {
                require Text::ParseWords;
        # TODO: help wanted: other common FOSS MUAs
        } else {
                require Text::ParseWords;
-               my @cmd = Text::ParseWords::shellwords($mua);
+               @cmd = Text::ParseWords::shellwords($mua);
                # mutt uses '%f' for open-hook with compressed mbox, we follow
                @cmd = map { $_ eq '%f' ? ($replaced = $mfolder) : $_ } @cmd;
        }
                # mutt uses '%f' for open-hook with compressed mbox, we follow
                @cmd = map { $_ eq '%f' ? ($replaced = $mfolder) : $_ } @cmd;
        }