fix: use more portable type -p to find executable

`which` is not guaranteed to be installed on all machines. Since the
script is meant to be run on the user's host machine it is more portable
to use `type -p` here.

Closes: https://github.com/dockcross/dockcross/issues/880
This commit is contained in:
Steffen Winter
2025-08-24 13:42:00 +02:00
parent 0a27819132
commit 4a8ba629f6
+2 -2
View File
@@ -24,9 +24,9 @@ has() {
# If OCI_EXE is not already set, search for a container executor (OCI stands for "Open Container Initiative")
if [ -z "$OCI_EXE" ]; then
if which podman >/dev/null 2>/dev/null; then
if type -p podman >/dev/null 2>/dev/null; then
OCI_EXE=podman
elif which docker >/dev/null 2>/dev/null; then
elif type -p docker >/dev/null 2>/dev/null; then
OCI_EXE=docker
else
die "Cannot find a container executor. Search for docker and podman."