From 7c415fb407ba63ddbd7e5329d660e4befd7a9131 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Fri, 11 Aug 2017 13:17:30 +0000 Subject: more autoflush/machinereadable stuff for tlshell git-svn-id: svn://tug.org/texlive/trunk@45019 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/scripts/texlive/tlmgr.pl | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/Master/texmf-dist/scripts/texlive/tlmgr.pl b/Master/texmf-dist/scripts/texlive/tlmgr.pl index 5874ac52bb7..d15e75a308b 100755 --- a/Master/texmf-dist/scripts/texlive/tlmgr.pl +++ b/Master/texmf-dist/scripts/texlive/tlmgr.pl @@ -5890,8 +5890,11 @@ sub action_shell { my $did_prompt = 0; while (defined(my $arg = shift @_)) { if ($arg =~ m/^-prompt$/) { - print shift @_, " "; - $did_prompt = 1; + # only do allow for prompt rewriting in case of ! machine readable! + if (!$::machinereadable) { + print shift @_, " "; + $did_prompt = 1; + } } elsif ($arg =~ m/^-menu$/) { my $options = shift @_; @options = @$options; @@ -5907,8 +5910,11 @@ sub action_shell { } elsif ($arg =~ m/^-/) { print "ERROR unsupported prompt command, please report: $arg!\n"; } else { - print $arg, " "; - $did_prompt = 1; + # only do allow for prompt rewriting in case of ! machine readable! + if (!$::machinereadable) { + print $arg, " "; + $did_prompt = 1; + } } } print "$default_prompt " if (!$did_prompt); @@ -5940,6 +5946,7 @@ sub action_shell { } if (!$isok) { print("Please answer one of: @guarantee\n"); + print "\n" if $opts{'autoflush'}; return(&$do_prompt(@savedargs)); } } -- cgit v1.2.3