From 06e737558e409a7cf2daacd88b2e6bbe3f4fdd76 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Tue, 14 Nov 2017 08:45:15 +0000 Subject: tlmgr paper: use tlmgr in msgs, report file, break when --json is unsupported git-svn-id: svn://tug.org/texlive/trunk@45794 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/scripts/texlive/tlmgr.pl | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'Master/texmf-dist/scripts') diff --git a/Master/texmf-dist/scripts/texlive/tlmgr.pl b/Master/texmf-dist/scripts/texlive/tlmgr.pl index b9ebe94dd6b..61f8ff5aec8 100755 --- a/Master/texmf-dist/scripts/texlive/tlmgr.pl +++ b/Master/texmf-dist/scripts/texlive/tlmgr.pl @@ -110,6 +110,8 @@ use TeXLive::TLPaper; # # set up $prg for warning messages $prg = TeXLive::TLUtils::basename($0); +# for usage in various Perl modules +$::prg = $prg; binmode(STDOUT, ":utf8"); binmode(STDERR, ":utf8"); @@ -1242,6 +1244,10 @@ sub action_paper { } else { # tlmgr paper {a4|letter} => do it. return ($F_ERROR) if !check_on_writable(); + if ($opts{'json'}) { + tlwarn("$prg: option --json not supported with other arguments\n"); + return ($F_ERROR); + } my $ret = $F_OK; for my $prog (sort keys %TeXLive::TLPaper::paper) { my $pkg = $TeXLive::TLPaper::paper{$prog}{'pkg'}; @@ -1254,6 +1260,10 @@ sub action_paper { } } else { # program-specific paper + if ($opts{'json'}) { + tlwarn("$prg: option --json not supported with other arguments\n"); + return ($F_ERROR); + } my $prog = $action; # first argument is the program to change my $pkg = $TeXLive::TLPaper::paper{$prog}{'pkg'}; if (!$pkg) { -- cgit v1.2.3