gpoore / minted

minted is a LaTeX package that provides syntax highlighting using the Pygments library. Highlighted source code can be customized using fancyvrb.
1.74k stars 126 forks source link

Use portable `command -v` to detect installed programs #345

Closed ArchangeGabriel closed 1 year ago

ArchangeGabriel commented 1 year ago

The which utility is not guaranteed to be installed, and if it is, its behavior is not portable either.

Conversely, the command -v shell builtin is required to exist in all POSIX 2008 compliant shells, and is thus guaranteed to work everywhere.

Compiling a document using minted on a system without which results in:

sh: line 1: which : command not found

! Package minted Error: You must have `pygmentize' installed to use this package.

See the minted package documentation for explanation.
Type  H <return>  for immediate help.
ArchangeGabriel commented 1 year ago

Ping as I had to modify my local install again after updating to TeX Live 2023…

gpoore commented 1 year ago

Thanks for the recommendation. This is now fixed in the development version. A new release will be out in a few days. Sorry for the delay...I can typically only do a couple of releases per year at present.