-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Conversation
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.
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ 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. |
Co-authored-by: Amin Vakil <[email protected]>
@@ -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 '')" |
There was a problem hiding this comment.
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
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 '')" |
With #3595, we now check both
docker-compose
anddocker compose
versions so this patch removes the implicit fallback todocker-compose
for$dc_base
and makes it explicit.