summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/scripts
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2015-01-08 17:29:46 +0000
committerKarl Berry <karl@freefriends.org>2015-01-08 17:29:46 +0000
commitb7425591a7f97a224c92f5a1773d14f392f0339e (patch)
tree23ab838ba970e54da9a6d11f4183cb3c33c38cb5 /Master/texmf-dist/scripts
parent3dda18b19cb24049cb777e6a1bd14660a9099765 (diff)
complain early if action is unknown, as in
tlmgr foo --help. (Trivially distinguish from the existing msg, which should never get invoked now.) git-svn-id: svn://tug.org/texlive/trunk@35995 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/scripts')
-rwxr-xr-xMaster/texmf-dist/scripts/texlive/tlmgr.pl14
1 files changed, 9 insertions, 5 deletions
diff --git a/Master/texmf-dist/scripts/texlive/tlmgr.pl b/Master/texmf-dist/scripts/texlive/tlmgr.pl
index 699b71c2bf6..77230c6c798 100755
--- a/Master/texmf-dist/scripts/texlive/tlmgr.pl
+++ b/Master/texmf-dist/scripts/texlive/tlmgr.pl
@@ -1,7 +1,7 @@
#!/usr/bin/env perl
# $Id$
#
-# Copyright 2008-2014 Norbert Preining
+# Copyright 2008-2015 Norbert Preining
# This file is licensed under the GNU General Public License version 2
# or any later version.
@@ -161,6 +161,7 @@ sub main {
"rebuild-sys" => 1 },
"get-mirror" => { },
"gui" => { "load" => 1 },
+ "help" => { },
"info" => { "list" => 1,
"only-installed" => 1 },
"install" => { "dry-run|n" => 1,
@@ -275,6 +276,10 @@ sub main {
exit 0;
}
+ if (defined($action) && $action && !exists $actionoptions{$action}) {
+ die "$prg: unknown action: $action; try --help if you need it.\n";
+ }
+
if ((!defined($action) || !$action) && !$opts{"help"} && !$opts{"h"}) {
die "$prg: missing action; try --help if you need it.\n";
}
@@ -292,9 +297,8 @@ sub main {
@noperldoc = ("-noperldoc", "1");
} else {
# checking only for the existence of perldoc is not enough
- # because stupid Debian/Ubuntu ships a stub that does nothing
- # which is very very bad idea
- # try to check for that, too
+ # because Debian/Ubuntu unfortunately ship a stub that does nothing;
+ # try to check for that, too.
my $ret = system("perldoc -V >/dev/null 2>&1");
if ($ret == 0) {
debug("working perldoc found, using it\n");
@@ -609,7 +613,7 @@ sub execute_action {
action_recreate_tlpdb();
finish(0);
} else {
- die "$prg: unknown action: $action; try --help if you need it.\n";
+ die "$prg: unknown action $action; try --help if you need it.\n";
}
# close the special log file