You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The recently-added CHECK_POSIX_SH [1] uses command -v. This is widely accepted as the proper answer to "how do I portably check if a command exists" [2], and has been part of our make test since 2016-04-23 [3].
However, -v only became mandatory in issue 7; previously, it was a [UP] User Portability Utilities option [4]. The debian posh shell does not support it, for example. Solaris is inconsistent between the shell built-in command, /usr/bin/command, the man-page, and /usr/xpg4/bin/command (the latter one is fully compatible with POSIX issue 7, as far as I can tell).
I'm still investigating, but thought that I should document the issue.
The recently-added
CHECK_POSIX_SH
[1] usescommand -v
. This is widely accepted as the proper answer to "how do I portably check if a command exists" [2], and has been part of ourmake test
since 2016-04-23 [3].However,
-v
only became mandatory in issue 7; previously, it was a [UP] User Portability Utilities option [4]. The debianposh
shell does not support it, for example. Solaris is inconsistent between the shell built-incommand
,/usr/bin/command
, the man-page, and/usr/xpg4/bin/command
(the latter one is fully compatible with POSIX issue 7, as far as I can tell).I'm still investigating, but thought that I should document the issue.
[1] abb7241
[2] https://stackoverflow.com/a/677212
[3] 4dc4eeb
[4] https://pubs.opengroup.org/onlinepubs/009695399/utilities/command.html
The text was updated successfully, but these errors were encountered: