fix podman-compose + python (3/x)

This commit is contained in:
Gitouche 2024-06-11 21:59:32 +02:00
parent be8aadfbdf
commit e0041d998c

View file

@ -351,16 +351,14 @@ oci_push_to_registry () {
fi fi
} }
my_podman_compose () { podman_compose_path=$(which podman-compose)
podman_compose_path=$(which podman-compose) if [[ ! -z ${podman_compose_path} ]]; then
for py in python3.9 python3.6; do
if [[ ! -z ${podman_compose_path} ]]; then ${py} ${podman_compose_path} --version 2>/dev/null 1>&2
for py in python3.9 python3.6; do if [[ $? -eq 0 ]]; then
${py} ${podman_compose_path} --version 2>/dev/null 1>&2 my_podman_compose="${py} ${podman_compose_path}"
if [[ $? -eq 0 ]]; then break
"${py} ${podman_compose_path} ${@}" fi
break done
fi fi
done
fi
} }