You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The documentation of the conditional function \sys_get_shell:nnNTF says:
The \sys_get_shell:nnNTF conditional inserts the ⟨true code⟩ if the shell is available and no quote is detected, and the ⟨false code⟩ otherwise.
Here is how I understand this description: The conditional function \sys_get_shell:nnNTF enters the true branch when the shell access is restricted or unrestricted, the shell command contains no ASCII quote characters, and the TeX engine made an actual attempt to execute the shell command (regardless of the exit code).
However, as shown by the following example document example.tex, the conditional function \sys_get_shell:nnNTF does not seem to handle the last case, where TeX did not make an attempt to execute the shell command, because the shell access was restricted:
Running pdftex example.tex produces the following output:
This is pdfTeX, Version 3.141592653-2.6-1.40.25 (TeX Live 2023) (preloaded format=pdftex)
restricted \write18 enabled.
entering extended mode
(./example.tex
(/usr/local/texlive/2023/texmf-dist/tex/latex/l3kernel/expl3-generic.tex
(/usr/local/texlive/2023/texmf-dist/tex/latex/l3kernel/expl3-code.tex)
(/usr/local/texlive/2023/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def))
runpopen command not allowed: echo1+2
! I can't find file `"|echo 1+2|bc -l"'.
<to be read again>
\scan_stop:
l.3 ...t_shell:nnNTF { echo~1 + 2 | bc~-l } { } \l_tmpa_tl
{ $1 + 2 = \l_tmpa_tl$ } ...
(Press Enter to retry, or Control-D to exit)
Please type another input file name:
I would expect either a document with the text Failure to be produced or a sentence in the documentation of the conditional function \sys_get_shell:nnNTF that clarifies that the consitional function does not handle cases, where shell access is restricted and the shell command is not allowed, and that in such cases, the TeX engine will produce unhandled errors.
The text was updated successfully, but these errors were encountered:
The documentation of the conditional function
\sys_get_shell:nnNTF
says:Here is how I understand this description: The conditional function
\sys_get_shell:nnNTF
enters the true branch when the shell access is restricted or unrestricted, the shell command contains no ASCII quote characters, and the TeX engine made an actual attempt to execute the shell command (regardless of the exit code).However, as shown by the following example document
example.tex
, the conditional function\sys_get_shell:nnNTF
does not seem to handle the last case, where TeX did not make an attempt to execute the shell command, because the shell access was restricted:Running
pdftex example.tex
produces the following output:I would expect either a document with the text
Failure
to be produced or a sentence in the documentation of the conditional function\sys_get_shell:nnNTF
that clarifies that the consitional function does not handle cases, where shell access is restricted and the shell command is not allowed, and that in such cases, the TeX engine will produce unhandled errors.The text was updated successfully, but these errors were encountered: