mirror of
https://github.com/bensuperpc/dockcross.git
synced 2026-07-26 04:48:08 +02:00
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:
@@ -24,9 +24,9 @@ has() {
|
|||||||
|
|
||||||
# If OCI_EXE is not already set, search for a container executor (OCI stands for "Open Container Initiative")
|
# If OCI_EXE is not already set, search for a container executor (OCI stands for "Open Container Initiative")
|
||||||
if [ -z "$OCI_EXE" ]; then
|
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
|
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
|
OCI_EXE=docker
|
||||||
else
|
else
|
||||||
die "Cannot find a container executor. Search for docker and podman."
|
die "Cannot find a container executor. Search for docker and podman."
|
||||||
|
|||||||
Reference in New Issue
Block a user