From 152c429a0fff7a571d212c7a3744c8c25ce9e62a Mon Sep 17 00:00:00 2001 From: Papa Bakary Camara Date: Fri, 9 Aug 2024 10:47:36 +0200 Subject: [PATCH] Switch order of checks --- run_in_docker.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/run_in_docker.sh b/run_in_docker.sh index af819dc2..47a78314 100755 --- a/run_in_docker.sh +++ b/run_in_docker.sh @@ -7,16 +7,17 @@ command_exists() { command -v "$1" &> /dev/null } -# Check if Podman is installed -if command_exists podman; then - CONTAINER_TOOL="podman" - COMPOSER="podman-compose" + # Check if Docker is installed -elif command_exists docker; then +if command_exists docker; then CONTAINER_TOOL="docker" COMPOSER="docker compose" +# Check if Podman is installed +elif command_exists podman; then + CONTAINER_TOOL="podman" + COMPOSER="podman-compose" else - echo "Neither Docker nor Podman is installed on this system." + echo "Neither Docker nor Podman are installed on this system." exit 1 fi