[tex-live] tlmgr w/ --machine-readable uses incorrect file descriptor

Yudai NAKATA yudai.nkt at gmail.com
Tue Feb 20 05:55:38 CET 2018


I found the following paragraph in the documentation.

> With the −−machine−readable option, tlmgr writes to stdout in the fixed
> line-oriented format described here, and the usual informational messages
> for human consumption are written to stderr (normally they are written to stdout).

Does tlmgr --version --machine-readable fall under the latter category (i.e.,
information consumed by human)?

Best regards,
Yudai Nakata

On 2018年2月20日 at 1:01:05, Yudai NAKATA (yudai.nkt at gmail.com) wrote:
> Dear all,
>
> I noticed that tlmgr with --machine-readable option seems to use stderr
> even when the exit status is 0.
>
> $ tlmgr --version > human.stdout 2> human.stderr
> $ tlmgr --version --machine-readable > machine.stdout 2> machine.stderr
> $ echo $?
> 0
> $ cat human.stdout
> tlmgr revision 46034 (2017-12-11 02:54:21 +0100)
> tlmgr using installation: /usr/local/texlive/2017
> TeX Live (http://tug.org/texlive) version 2017
> $ cat machine.stderr
> revision 46034
> installation /usr/local/texlive/2017
> tlversion 2017
> TLConfig 45617
> TLUtils 46045
>
> IMHO, I don’t think this is a good idea. Machine readable output is often intended
> to be used in conjunction with other programs, so it should use stdout unless there
> is some error.
>
> Best regards,
> Yudai Nakata



More information about the tex-live mailing list