hoene / libmysofa

Reader for AES SOFA files to get better HRTFs
Other
137 stars 73 forks source link

replace 'which' with 'command -v' #175

Closed umlaeute closed 2 years ago

umlaeute commented 2 years ago

TL;DR: the non-standardized (but common) which is considered deprecated by some distributions, and command -v provides the same functionality while being POSIX-compliant.. consider switching to it.

the test-scripts tests/compare.sh and tests/compareIgnoreNew.sh use the which utility to check for an installation of node (and use various fallbacks).

Now which is a nice tool, but it is not standardized (e.g. by POSIX). otoh POSIX does mandate command -v which has about the same functionality. For this reason some distributions (e.g. Debian) have started to fade out which (in favour of command -v). Starting with the next Debian release (bookworm) this utility might be gone (from the standard tools), and at the very least output a big fat warning (as it already does in current Debian/testing).

already the Debian CI-tests have started failing because of this (as by-default they consider any output on stderr a failure; it's easy enough to disable this behvaiour of the CI, but then: it's just as easy to fix the underlying problem)