Uh oh!
There was an error while loading. Please reload this page.
fix(local): detect docker compose v2+ when version has no 'v' prefix - #6231
Conversation
Docker Compose installed via Homebrew reports its version without a leading 'v' (e.g. "Docker Compose version 2.22.0"). The detection regex `v(\d+)` required a literal 'v' before the digits, so `_get_compose_cmd_prefix` failed to recognize a valid Compose v2+ plugin in that case. Change the regex to `version\s+v?(\d+)`, making the 'v' optional and anchoring to the "version" keyword so a stray number elsewhere in the output can't cause a false positive. v1 is still correctly rejected. Applied to all three v3 copies (core local image, core modules local container, train local container) with regression tests for the no-'v'-prefix format. Fixesaws#4137
Claude finished @mohamedzeidan2021's task in 1m 0s —— View job PR Review — Docker Compose version detection fix
Verdict: ✅ Looks goodThe fix is correct, minimal, and consistently applied. Changing
TestsRegression tests for the no-'v'-prefix format were added to all three test suites ( Minor (optional, non-blocking)
Nothing else stood out — no correctness, security, or backward-compat concerns. The change is a pure bug fix to an internal detection helper ( |
Uh oh!
There was an error while loading. Please reload this page.
Docker Compose installed via Homebrew reports its version without a leading 'v' (e.g. "Docker Compose version 2.22.0"). The detection regex
v(\d+)required a literal 'v' before the digits, so_get_compose_cmd_prefixfailed to recognize a valid Compose v2+ plugin in that case.Change the regex to
version\s+v?(\d+), making the 'v' optional and anchoring to the "version" keyword so a stray number elsewhere in the output can't cause a false positive. v1 is still correctly rejected.Applied to all three v3 copies (core local image, core modules local container, train local container) with regression tests for the no-'v'-prefix format.
Fixes#4137
Issue #, if available:
Description of changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.