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

ref: Less complicated docker compose detection #3604

Merged
merged 3 commits into from
Mar 5, 2025

Conversation

BYK
Copy link
Member

@BYK BYK commented Mar 5, 2025

With #3595, we now check both docker-compose and docker compose versions so this patch removes the implicit fallback to docker-compose for $dc_base and makes it explicit.

With #3595, we now check both `docker-compose` and `docker compose` versions so this patch removes the implicit fallback to `docker-compose` for `$dc_base` and makes it explicit.
@BYK BYK enabled auto-merge (squash) March 5, 2025 12:41
Copy link

codecov bot commented Mar 5, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.45%. Comparing base (d885dd3) to head (b130b23).
Report is 1 commits behind head on master.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3604   +/-   ##
=======================================
  Coverage   99.45%   99.45%           
=======================================
  Files           3        3           
  Lines         183      183           
=======================================
  Hits          182      182           
  Misses          1        1           

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

Co-authored-by: Amin Vakil <[email protected]>
@BYK BYK requested a review from aminvakil March 5, 2025 14:00
@@ -9,22 +9,20 @@ fi
echo "${_group}Initializing Docker Compose ..."

# To support users that are symlinking to docker-compose
dc_base="$(docker compose version &>/dev/null && echo 'docker compose' || echo 'docker-compose')"
dc_base="$(docker compose version --short &>/dev/null && echo 'docker compose' || echo '')"
dc_base_standalone="$(docker-compose version &>/dev/null && echo 'docker-compose' || echo '')"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might as well use --short here too

Suggested change
dc_base_standalone="$(docker-compose version &>/dev/null && echo 'docker-compose' || echo '')"
dc_base_standalone="$(docker-compose version --short &>/dev/null && echo 'docker-compose' || echo '')"

@BYK BYK merged commit e86d185 into master Mar 5, 2025
9 checks passed
@BYK BYK deleted the byk/ref/simplify-dc-detection branch March 5, 2025 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants