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
Fix the `command -v` exit status handling to account for dash being
`/bin/sh` (this is e.g. the default on Debian). Unlike bash, dash exits
with status 127 if the requested program does not exist -- and testinfra
wrongly interpreted that as `command` being unavailable.
Instead of attempting to use `command -v` and `which` in order, peform
an additional (cached) `command -v command` invocation to determine
whether `command` is available. Furthermore, assume that `command -v`
can return any non-zero status for command not existing, per POSIX.
This fixes exists() and find_command() raising an exception on systems
using dash as `/bin/sh` and lacking `which(1)`.
Fixes#668
0 commit comments