diff options
Diffstat (limited to 'Master')
-rwxr-xr-x | Master/texmf-dist/scripts/texlive/tlmgr.pl | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/Master/texmf-dist/scripts/texlive/tlmgr.pl b/Master/texmf-dist/scripts/texlive/tlmgr.pl index 7343a91fb61..95f7fe2cfc5 100755 --- a/Master/texmf-dist/scripts/texlive/tlmgr.pl +++ b/Master/texmf-dist/scripts/texlive/tlmgr.pl @@ -5908,7 +5908,10 @@ sub action_shell { my $dest = shift @args; print "ERROR not implemented: $cmd\n"; } elsif ($cmd =~ m/^(set|get)$/) { - my @valid_keys = qw/repository debug-translation machine-readable no-execute-actions require-verification verify-downloads/; + my @valid_bool_keys = qw/debug-translation machine-readable no-execute-actions require-verification verify-downloads/; + my @valid_string_keys = qw/repository/; + my @valid_keys = @valid_bool_keys; + push @valid_keys, @valid_string_keys; my $key = shift @args; my $val = shift @args; if (!$key) { @@ -5946,9 +5949,16 @@ sub action_shell { } } print "OK\n"; - } elsif ($key =~ m/^(debug-translation|machine-readable|no-execute-actions|require-verification|verify-downloads)$/) { + } elsif (TeXLive::TLUtils::member($key, @valid_bool_keys)) { if ($cmd eq "set") { - $opts{$key} = ($val eq "1" ? 1 : 0); + if ($val eq "0") { + $opts{$key} = 0; + } elsif ($val eq "1") { + $opts{$key} = 1; + } else { + print "ERROR invalid value $val for key $key\n"; + next; + } # special cases $::debug_translation = $opts{"debug-translation"}; $::machinereadable = $opts{"machine-readable"}; |