summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2020-04-11 00:19:37 +0000
committerNorbert Preining <preining@logic.at>2020-04-11 00:19:37 +0000
commit73b93ba7794029485ef24631764fe159aaa305ee (patch)
tree9a7e33b849ebadfdf067e30c7f4b1a464a43f8f0 /Master
parent94b447715a0ea5fe7d581125121a02ae718b9865 (diff)
tlmgr shell: make sure not to die in machine readable on remote load error
git-svn-id: svn://tug.org/texlive/trunk@54643 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rwxr-xr-xMaster/texmf-dist/scripts/texlive/tlmgr.pl12
1 files changed, 10 insertions, 2 deletions
diff --git a/Master/texmf-dist/scripts/texlive/tlmgr.pl b/Master/texmf-dist/scripts/texlive/tlmgr.pl
index a63741af265..6410f2e6dc4 100755
--- a/Master/texmf-dist/scripts/texlive/tlmgr.pl
+++ b/Master/texmf-dist/scripts/texlive/tlmgr.pl
@@ -6625,8 +6625,16 @@ sub action_shell {
init_local_db();
print "OK\n";
} elsif ($what eq "remote") {
- init_tlmedia_or_die();
- print "OK\n";
+ my ($ret, $err) = init_tlmedia();
+ if ($ret) {
+ print("OK\n");
+ } else {
+ if ($::machinereadable) {
+ # replace \n with \\n to get single line
+ $err =~ s/\n/\\n/g;
+ }
+ print("ERROR $err\n");
+ }
} else {
print "ERROR can only load 'local' or 'remote', not $what\n";
}