10000 Use portable `command -v` to detect installed programs by ArchangeGabriel · Pull Request #345 · gpoore/minted · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Use portable command -v to detect installed programs #345

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

Use portable command -v to detect installed programs #345

wants to merge 1 commit into from

Conversation

ArchangeGabriel
Copy link
@ArchangeGabriel ArchangeGabriel commented Nov 19, 2022

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.

The `which` utility is not guaranteed to be installed either, 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.
@ArchangeGabriel
Copy link
Author

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

gpoore added a commit that referenced this pull request Jul 13, 2023
…-v rather than which to provide better cross-platform support (#345)
@gpoore
Copy link
Owner
gpoore commented Jul 13, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0