diff options
author | Karl Berry <karl@freefriends.org> | 2020-03-21 21:20:37 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2020-03-21 21:20:37 +0000 |
commit | 84b5e6586f4b098d4f93a04ecc3dbfaa183f9836 (patch) | |
tree | 9fd8933da4deac90c14a3a7aaf959d7a6ac15c18 /Master/texmf-dist/scripts/latexindent/LatexIndent/LogFile.pm | |
parent | cffdb1fe27f760b0db26ceb41316473593e4851e (diff) |
latexindent (21mar20)
git-svn-id: svn://tug.org/texlive/trunk@54454 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/scripts/latexindent/LatexIndent/LogFile.pm')
-rw-r--r-- | Master/texmf-dist/scripts/latexindent/LatexIndent/LogFile.pm | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Master/texmf-dist/scripts/latexindent/LatexIndent/LogFile.pm b/Master/texmf-dist/scripts/latexindent/LatexIndent/LogFile.pm index 75ebe0b2ea2..763ca6e39e6 100644 --- a/Master/texmf-dist/scripts/latexindent/LatexIndent/LogFile.pm +++ b/Master/texmf-dist/scripts/latexindent/LatexIndent/LogFile.pm @@ -103,7 +103,7 @@ ENDQUOTE ${$self}{cruftDirectory} = $switches{cruftDirectory}||(dirname ${$self}{fileName}); die "Could not find directory ${$self}{cruftDirectory}\nExiting, no indentation done." if(!(-d ${$self}{cruftDirectory})); - my $logfileName = ($switches{cruftDirectory} ? ${$self}{cruftDirectory} : '').($switches{logFileName}||"indent.log"); + my $logfileName = ($switches{cruftDirectory} ? ${$self}{cruftDirectory}."/" : '').($switches{logFileName}||"indent.log"); # layout of the logfile information, for example # @@ -168,8 +168,10 @@ ENDQUOTE $logger->info("Filename: ${$self}{fileName}"); } else { $logger->info("Reading input from STDIN"); - my $buttonText = ($FindBin::Script eq 'latexindent.exe') ? 'CTRL+Z followed by ENTER':'CTRL+D'; - print STDERR "Please enter text to be indented: (press $buttonText when finished)\n"; + if (-t STDIN) { + my $buttonText = ($FindBin::Script eq 'latexindent.exe') ? 'CTRL+Z followed by ENTER':'CTRL+D'; + print STDERR "Please enter text to be indented: (press $buttonText when finished)\n"; + } } # log the switches from the user |