From 45c4fdf9dd06b9bc8a731c46853fef03b4fed6e5 Mon Sep 17 00:00:00 2001 From: Nigel Banks Date: Mon, 5 Apr 2021 13:17:41 +0100 Subject: [PATCH] All projects is relative to the project invoking it so set it to the root project. --- src/main/kotlin/tasks/DockerCompose.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/tasks/DockerCompose.kt b/src/main/kotlin/tasks/DockerCompose.kt index 45c78d8..219a0cb 100644 --- a/src/main/kotlin/tasks/DockerCompose.kt +++ b/src/main/kotlin/tasks/DockerCompose.kt @@ -152,7 +152,7 @@ abstract class DockerCompose : DockerClient() { fun pull() = dockerCompose.services.keys.mapNotNull { name -> // Find services that do not match any projects and pull them as they must refer to an external image. // Other images will be provided by dependency on the image digests. - if (project.allprojects.none { it.isDockerProject && it.name == name }) name else null + if (project.rootProject.allprojects.none { it.isDockerProject && it.name == name }) name else null }.let { services -> if (services.isNotEmpty()) { invoke("pull", *services.toTypedArray())