fix: check each required binaries one-by-one
This commit is contained in:
		@@ -48,20 +48,28 @@ class InstallDocker
 | 
				
			|||||||
            if ($supported_os_type->contains('debian')) {
 | 
					            if ($supported_os_type->contains('debian')) {
 | 
				
			||||||
                $command = $command->merge([
 | 
					                $command = $command->merge([
 | 
				
			||||||
                    "echo 'Installing Prerequisites...'",
 | 
					                    "echo 'Installing Prerequisites...'",
 | 
				
			||||||
                    "command -v jq >/dev/null || apt-get update -y",
 | 
					                    "apt-get update -y",
 | 
				
			||||||
                    "command -v jq >/dev/null || apt install -y curl wget git jq",
 | 
					                    "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')) {
 | 
					            } else if ($supported_os_type->contains('rhel')) {
 | 
				
			||||||
                $command = $command->merge([
 | 
					                $command = $command->merge([
 | 
				
			||||||
                    "echo 'Installing Prerequisites...'",
 | 
					                    "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')) {
 | 
					            } else if ($supported_os_type->contains('sles')) {
 | 
				
			||||||
                $command = $command->merge([
 | 
					                $command = $command->merge([
 | 
				
			||||||
                    "echo 'Installing Prerequisites...'",
 | 
					                    "echo 'Installing Prerequisites...'",
 | 
				
			||||||
                    "command -v jq >/dev/null || zypper update -y",
 | 
					                    " zypper update -y",
 | 
				
			||||||
                    "command -v jq >/dev/null || zypper install -y curl wget git jq",
 | 
					                    "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 {
 | 
					            } else {
 | 
				
			||||||
                throw new \Exception('Unsupported OS');
 | 
					                throw new \Exception('Unsupported OS');
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user