diff options
Diffstat (limited to 'macros/latex/contrib/iexec/iexec.dtx')
-rw-r--r-- | macros/latex/contrib/iexec/iexec.dtx | 42 |
1 files changed, 28 insertions, 14 deletions
diff --git a/macros/latex/contrib/iexec/iexec.dtx b/macros/latex/contrib/iexec/iexec.dtx index 12eabd6e28..e6e9905fb2 100644 --- a/macros/latex/contrib/iexec/iexec.dtx +++ b/macros/latex/contrib/iexec/iexec.dtx @@ -1,7 +1,7 @@ % \iffalse meta-comment % (The MIT License) % -% Copyright (c) 2021-2022 Yegor Bugayenko +% Copyright (c) 2021-2023 Yegor Bugayenko % % Permission is hereby granted, free of charge, to any person obtaining a copy % of this software and associated documentation files (the 'Software'), to deal @@ -50,7 +50,7 @@ %<package>\NeedsTeXFormat{LaTeX2e} %<package>\ProvidesPackage{iexec} %<*package> -[2023-10-12 0.12.0 Inputable Shell Executions] +[2023-12-28 0.13.0 Inputable Shell Executions] %</package> %<*driver> \documentclass{ltxdoc} @@ -109,6 +109,10 @@ % in order to let \href{https://ctan.org/pkg/shellesc}{shellesc} % execute your shell command. +% It is important to remember that \LaTeX{} always uses ``|/bin/sh|'' shell. +% This can't be changed, +% as \href{https://tex.stackexchange.com/questions/698312}{explained here}. + % \section{Options} % \DescribeMacro{quiet} @@ -396,20 +400,30 @@ Today is \iexec{date +\%Y}! % \changes{0.11.2}{2022/10/25}{If execution fails, we print the content of ``\texttt{stdout}'' anyway, even if the ``\texttt{log}'' is not turned on.} % \begin{macrocode} \ifdefined\iexec@null\else% - \ifdefined\iexec@log% - \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}% + \IfFileExists + {\iexec@stdout} + {} + {\PackageError{iexec}{The "\iexec@stdout" file is absent + after processing, looks like some internal error}{}}% + \ifdefined\iexec@log% + \message{iexec: This is the content of '\iexec@stdout':^^J}% + \IfFileExists + {\iexec@stdout} + {\iexec@typeout{\iexec@stdout}} + {\PackageError{iexec}{The "\iexec@stdout" file is absent + after processing, looks like some internal error}{}}% + \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\fi% + \fi% % \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} |