which is nonstandard and deprecated on Debian. Use POSIX shell built-in command -v instead.
This fixes warnings on Debian.