From 3f9b0643ee74f5107f783624744ceb21aba43b75 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Sat, 13 Apr 2024 16:23:44 +0200 Subject: [PATCH] fix: check each required binaries one-by-one --- app/Actions/Server/InstallDocker.php | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/app/Actions/Server/InstallDocker.php b/app/Actions/Server/InstallDocker.php index 1db766a88..d1db588cd 100644 --- a/app/Actions/Server/InstallDocker.php +++ b/app/Actions/Server/InstallDocker.php @@ -48,20 +48,28 @@ public function handle(Server $server) if ($supported_os_type->contains('debian')) { $command = $command->merge([ "echo 'Installing Prerequisites...'", - "command -v jq >/dev/null || apt-get update -y", - "command -v jq >/dev/null || apt install -y curl wget git jq", - + "apt-get update -y", + "command -v curl >/dev/null || apt install -y curl", + "command -v wget >/dev/null || apt install -y wget", + "command -v git >/dev/null || apt install -y git", + "command -v jq >/dev/null || apt install -y jq", ]); } else if ($supported_os_type->contains('rhel')) { $command = $command->merge([ "echo 'Installing Prerequisites...'", - "command -v jq >/dev/null || dnf install -y curl wget git jq", + "command -v curl >/dev/null || dnf install -y curl", + "command -v wget >/dev/null || dnf install -y wget", + "command -v git >/dev/null || dnf install -y git", + "command -v jq >/dev/null || dnf install -y jq", ]); } else if ($supported_os_type->contains('sles')) { $command = $command->merge([ "echo 'Installing Prerequisites...'", - "command -v jq >/dev/null || zypper update -y", - "command -v jq >/dev/null || zypper install -y curl wget git jq", + " zypper update -y", + "command -v curl >/dev/null || zypper install -y curl", + "command -v wget >/dev/null || zypper install -y wget", + "command -v git >/dev/null || zypper install -y git", + "command -v jq >/dev/null || zypper install -y jq", ]); } else { throw new \Exception('Unsupported OS');