diff --git a/src/main/groovy/com/avast/gradle/dockercompose/DockerExecutor.groovy b/src/main/groovy/com/avast/gradle/dockercompose/DockerExecutor.groovy index f01786d..121a57c 100644 --- a/src/main/groovy/com/avast/gradle/dockercompose/DockerExecutor.groovy +++ b/src/main/groovy/com/avast/gradle/dockercompose/DockerExecutor.groovy @@ -48,7 +48,7 @@ class DockerExecutor { String getDockerPlatform() { String osType = getDockerInfo().collect { it.trim() }.find { it.startsWith('OSType:') } - osType.empty ? System.getProperty("os.name") : osType.substring('OSType:'.length()).trim() + osType == null || osType.empty ? System.getProperty("os.name") : osType.substring('OSType:'.length()).trim() } String getContainerPlatform(Map inspection) {