From 73b93ba7794029485ef24631764fe159aaa305ee Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Sat, 11 Apr 2020 00:19:37 +0000 Subject: 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 --- Master/texmf-dist/scripts/texlive/tlmgr.pl | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'Master/texmf-dist/scripts/texlive') 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"; } -- cgit v1.2.3