summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
Diffstat (limited to 'Master')
-rwxr-xr-xMaster/texmf-dist/scripts/texlive/tlmgr.pl12
1 files changed, 9 insertions, 3 deletions
diff --git a/Master/texmf-dist/scripts/texlive/tlmgr.pl b/Master/texmf-dist/scripts/texlive/tlmgr.pl
index 1ccba6027d6..7d677000c51 100755
--- a/Master/texmf-dist/scripts/texlive/tlmgr.pl
+++ b/Master/texmf-dist/scripts/texlive/tlmgr.pl
@@ -25,6 +25,7 @@ our $packagelogfile;
our $packagelogged;
our $tlmgr_config_file;
our $pinfile;
+our $action; # for the pod2usage -sections call
BEGIN {
$^W = 1;
@@ -150,7 +151,7 @@ sub main {
"backupdir" => "=s",
"clean" => ":-99",
"dry-run|n" => 1 },
- "candidate" => { },
+ "candidates" => { },
"check" => { "use-svn" => 1 },
"conf" => { "conffile" => "=s",
"delete" => 1 },
@@ -243,7 +244,7 @@ sub main {
$::machinereadable = $opts{"machine-readable"}
if (defined($opts{"machine-readable"}));
- my $action = shift @ARGV;
+ $action = shift @ARGV;
if (!defined($action)) {
if ($opts{"gui"}) { # -gui = gui
$action = "gui";
@@ -320,8 +321,13 @@ sub main {
delete $ENV{'LESSPIPE'};
delete $ENV{'LESSOPEN'};
if ($action && ($action ne "help")) {
+ # 1) Must use [...] form for -sections arg because otherwise the
+ # /$action subsection selector applies to all sections.
+ # https://rt.cpan.org/Public/Bug/Display.html?id=102116
+ # 2) Must use "..." for that so the $action value is interpolated.
pod2usage(-exitstatus => 0, -verbose => 99,
- -sections => "NAME|SYNOPSIS|ACTIONS/$action.*" , @noperldoc);
+ -sections => [ 'NAME', 'SYNOPSIS', "ACTIONS/$::action.*" ],
+ @noperldoc);
} else {
if ($opts{"help"}) {
pod2usage(-exitstatus => 0, -verbose => 2, @noperldoc);