From 085c0a735e344d86b2aa45ef27594cd43ceeaf32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20August=C3=BDn?= Date: Sat, 31 Jul 2021 20:19:36 +0200 Subject: [PATCH] fix: Docker Compose version parsing fixed related to #310 --- .../com/avast/gradle/dockercompose/ComposeExecutor.groovy | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/groovy/com/avast/gradle/dockercompose/ComposeExecutor.groovy b/src/main/groovy/com/avast/gradle/dockercompose/ComposeExecutor.groovy index 20abf98..666d2c7 100644 --- a/src/main/groovy/com/avast/gradle/dockercompose/ComposeExecutor.groovy +++ b/src/main/groovy/com/avast/gradle/dockercompose/ComposeExecutor.groovy @@ -95,7 +95,8 @@ class ComposeExecutor { VersionNumber getVersion() { if (cachedVersion) return cachedVersion - cachedVersion = VersionNumber.parse(executeWithAnsi('version', '--short')) + String rawVersion = executeWithAnsi('version', '--short') + cachedVersion = VersionNumber.parse(rawVersion.startsWith('v') ? rawVersion.substring(1) : rawVersion) } Iterable getContainerIds(String serviceName) {