diff --git a/src/main/groovy/com/avast/gradle/dockercompose/ComposeExtension.groovy b/src/main/groovy/com/avast/gradle/dockercompose/ComposeExtension.groovy index 3b6fc17..1f2e94d 100644 --- a/src/main/groovy/com/avast/gradle/dockercompose/ComposeExtension.groovy +++ b/src/main/groovy/com/avast/gradle/dockercompose/ComposeExtension.groovy @@ -89,10 +89,11 @@ class ComposeExtension { } VersionNumber getDockerComposeVersion() { - def p = project + def p = this.project + def env = this.environment new ByteArrayOutputStream().withStream { os -> p.exec { ExecSpec e -> - e.environment = environment + e.environment = env e.commandLine composeCommand('--version') e.standardOutput = os }