summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2022-10-25 20:14:12 +0000
committerKarl Berry <karl@freefriends.org>2022-10-25 20:14:12 +0000
commitb3a1bb575cfbd99e6036e90235662a30d5e25e13 (patch)
tree24e3e30406ba76f3acf8523300c87581cf48638e /Master/texmf-dist/source/latex
parent6167a87b968065d467786c31a757fd89871ad3bd (diff)
iexec (25oct22)
git-svn-id: svn://tug.org/texlive/trunk@64810 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex')
-rw-r--r--Master/texmf-dist/source/latex/iexec/iexec.dtx28
1 files changed, 19 insertions, 9 deletions
diff --git a/Master/texmf-dist/source/latex/iexec/iexec.dtx b/Master/texmf-dist/source/latex/iexec/iexec.dtx
index 94b924652a8..0ee16eed8f4 100644
--- a/Master/texmf-dist/source/latex/iexec/iexec.dtx
+++ b/Master/texmf-dist/source/latex/iexec/iexec.dtx
@@ -50,7 +50,7 @@
%<package>\NeedsTeXFormat{LaTeX2e}
%<package>\ProvidesPackage{iexec}
%<*package>
-[2022-10-23 0.11.1 Inputable Shell Executions]
+[2022-10-25 0.11.2 Inputable Shell Executions]
%</package>
%<*driver>
\documentclass{ltxdoc}
@@ -354,7 +354,7 @@ This file won't be deleted: \iexec[stdout=me.txt]{whoami}.
\ifdefined\iexec@append>\fi>
\ifdefined\iexec@null/dev/null\else\iexec@stdout\fi
\space\ifdefined\iexec@stderr2>\iexec@stderr\else2>&1\fi;
- /bin/echo -n $?\% >\iexec@exit}
+ /bin/echo -n $?\% >\iexec@exit}%
\ShellEscape{\iexec@cmd}%
% \end{macrocode}
% Then, a message is printed to \TeX{} log:
@@ -364,21 +364,31 @@ This file won't be deleted: \iexec[stdout=me.txt]{whoami}.
\fi%
\endgroup%
% \end{macrocode}
+% Then, we read back the exit code, from the file:
+% \begin{macrocode}
+ \immediate\openin\iexec@exitfile=\iexec@exit%
+ \read\iexec@exitfile to \iexec@code%
+ \immediate\closein\iexec@exitfile%
+% \end{macrocode}
% Then, if required, we print the content of the stdout file to \TeX{} log:
+% \changes{0.11.2}{2022/10/25}{If execution fails, we print the content of 'stdout' anyway, even if the 'log' is not turned on.}
% \begin{macrocode}
\ifdefined\iexec@null\else%
\ifdefined\iexec@log%
- \message{iexec: This is the content of \iexec@stdout:^^J}%
+ \message{iexec: This is the content of '\iexec@stdout':^^J}%
\iexec@typeout{\iexec@stdout}%
\message{<EOF>^^J}%
+ \else%
+ \ifnum\iexec@code=0\else%
+ \ifdefined\iexec@ignore\else%
+ \message{iexec: See the content of '\iexec@stdout'
+ after failure:^^J}%
+ \iexec@typeout{\iexec@stdout}%
+ \message{<EOF>^^J}%
+ \fi%
+ \fi%
\fi\fi%
% \end{macrocode}
-% Then, we read back the exit code, from the file:
-% \begin{macrocode}
- \immediate\openin\iexec@exitfile=\iexec@exit%
- \read\iexec@exitfile to \iexec@code%
- \immediate\closein\iexec@exitfile%
-% \end{macrocode}
% Then, we check whether it's zero or not (if not zero, we either print a message or fail the build, depending on the presence of |ignore| option):
% \begin{macrocode}
\ifnum\iexec@code=0\else%