Skip to content

Commit d6ebde1

Browse files
dockerfiles/build.sh: fix buildx detection
`docker <subcommand> --help` cannot be used to detect whether a sub command is available because it exits with 0 no matter if the sub command exists or not. Use `docker buildx version` as a test for buildx support instead. Fixes: 17765c7 ("dockerfiles: support for docker/podman buildx") Reported-by: Sebastian Groß <[email protected]> Signed-off-by: Bastian Krause <[email protected]>
1 parent a8b6ab3 commit d6ebde1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dockerfiles/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ has_buildx() {
3131
local docker_cmd
3232
docker_cmd="${1}"
3333

34-
"${docker_cmd}" buildx --help >/dev/null 2>&1
34+
"${docker_cmd}" buildx version >/dev/null 2>&1
3535
}
3636

3737
get_docker_cmd() {

0 commit comments

Comments
 (0)