From 8ec5e7b2844ff234a2415e83e7a3ec95a28d5540 Mon Sep 17 00:00:00 2001 From: Jaroslaw Pietraszek Date: Mon, 20 Feb 2023 09:53:37 +0100 Subject: [PATCH] Change expected docker error message in case of network unavailability --- .../kotlin/com/cognifide/gradle/environment/docker/Stack.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/com/cognifide/gradle/environment/docker/Stack.kt b/src/main/kotlin/com/cognifide/gradle/environment/docker/Stack.kt index 61ad385..51ed54b 100644 --- a/src/main/kotlin/com/cognifide/gradle/environment/docker/Stack.kt +++ b/src/main/kotlin/com/cognifide/gradle/environment/docker/Stack.kt @@ -38,7 +38,7 @@ abstract class Stack(val environment: EnvironmentExtension) { } return when { result.exitValue == 0 -> true - result.errorString.contains("Error: No such network") -> false + result.errorString.contains(Regex("(?i)not found|no such")) -> false else -> throw StackException("Unable to determine Docker stack '${internalName.get()}' status. Error: '${result.errorString}'") } }