[tex-k] kpsewhich exit status

Karl Berry karl at freefriends.org
Fri Jan 5 02:47:36 CET 2007


    $ kpsewhich --expand-var=\$NONEXISTENTVAR; echo $?

Internally, variable.c:kpse_var_expand, which is what's being called,
does not distinguish between unset and set to empty.

If you want to distinguish, use -var-value=NONESUCH.  Exit status is 1
if not set.  Quoting is simpler too :).


More information about the tex-k mailing list