Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dockerfiles/build.sh: fix buildx detection #1597

Merged

Conversation

Bastian-Krause
Copy link
Member

Description
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.

Checklist

  • PR has been tested

Fixes: #1585

`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]>
Copy link

codecov bot commented Feb 4, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 55.8%. Comparing base (a8b6ab3) to head (d6ebde1).
Report is 4 commits behind head on master.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@          Coverage Diff           @@
##           master   #1597   +/-   ##
======================================
  Coverage    55.8%   55.8%           
======================================
  Files         170     170           
  Lines       13365   13365           
======================================
  Hits         7458    7458           
  Misses       5907    5907           
Flag Coverage Δ
3.10 55.7% <ø> (ø)
3.11 55.7% <ø> (ø)
3.12 55.7% <ø> (ø)
3.13 55.7% <ø> (ø)
3.9 55.8% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sgross-emlix
Copy link

LGTM

@Emantor Emantor merged commit 56a9bf2 into labgrid-project:master Feb 4, 2025
11 checks passed
@Bastian-Krause Bastian-Krause deleted the bst/docker-buildx-fix branch February 4, 2025 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

docker: build.sh: has_buildx returns false positive
3 participants