Skip to content

Commit

Permalink
Docker-build fails to detect podman
Browse files Browse the repository at this point in the history
Fixes #41085
  • Loading branch information
edeandrea committed Jun 10, 2024
1 parent b2c066a commit 8e20b6e
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import java.util.stream.Collectors;

import org.apache.commons.lang3.SystemUtils;

import org.eclipse.microprofile.config.ConfigProvider;
import org.jboss.logging.Logger;

Expand Down Expand Up @@ -50,7 +51,7 @@ public static ContainerRuntime detectContainerRuntime(ContainerRuntime... orderT
public static ContainerRuntime detectContainerRuntime(boolean required, ContainerRuntime... orderToCheckRuntimes) {
return detectContainerRuntime(
required,
(orderToCheckRuntimes != null) ? Arrays.asList(orderToCheckRuntimes)
((orderToCheckRuntimes != null) && (orderToCheckRuntimes.length > 0)) ? Arrays.asList(orderToCheckRuntimes)
: List.of(ContainerRuntime.DOCKER, ContainerRuntime.PODMAN));
}

Expand Down

0 comments on commit 8e20b6e

Please sign in to comment.