mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2026-03-21 22:56:47 +00:00
fix: check compose version output, not just exit code
Without the plugin, `docker compose version` can still exit 0 by falling through to `docker version`. Grep for "Compose" in the output to reliably detect the plugin.
This commit is contained in:
@@ -491,8 +491,10 @@ main() {
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Ensure Docker Compose V2 plugin is available
|
||||
if ! docker compose version &>/dev/null; then
|
||||
# Ensure Docker Compose V2 plugin is available.
|
||||
# Check output for "Compose" — without the plugin, `docker compose version`
|
||||
# may still exit 0 (falling through to `docker version`).
|
||||
if ! docker compose version 2>/dev/null | grep -qi compose; then
|
||||
err "Docker Compose plugin not found."
|
||||
err "Install Docker Desktop, OrbStack, or: brew install docker-compose"
|
||||
exit 1
|
||||
|
||||
Reference in New Issue
Block a user