Skip to content

Commit

Permalink
Switch from 'which' to 'command -v' to increase portability (#185)
Browse files Browse the repository at this point in the history
In minimal buildroots 'which' might not be installed, while
'command -v' is a shell built-in in all POSIX 2008 compliant
shells, supported by at least ash, bash, busybox, dash, ksh,
mksh and zsh.
  • Loading branch information
robert-scheck committed Apr 7, 2023
1 parent 3ce1bf6 commit d36ef38
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion configure
Original file line number Diff line number Diff line change
Expand Up @@ -832,7 +832,7 @@ fi

if [ -z "$PYTHON" ]; then
for pp in python python3 python2; do
if which $pp > /dev/null; then
if command -v $pp > /dev/null; then
PYTHON=$pp
break
fi
Expand Down

0 comments on commit d36ef38

Please sign in to comment.