Skip to content

Commit 9d88cf6

Browse files
authored
Don't error when warnings are written over stderr (#54)
1 parent ac3772d commit 9d88cf6

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/Elastic.Elasticsearch.Ephemeral/Tasks/IClusterComposeTask.cs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -184,9 +184,13 @@ private static void ExecuteBinaryInternal(EphemeralClusterConfiguration config,
184184
if (errorOut.Any() && config.Version < "5.2.0")
185185
errorOut = errorOut.Where(e => !e.Line.Contains("No log4j2 configuration file found")).ToList();
186186

187-
if (errorOut.Any(e =>
188-
!string.IsNullOrWhiteSpace(e.Line) && !e.Line.Contains("usage of JAVA_HOME is deprecated")) &&
189-
!binary.Contains("plugin") && !binary.Contains("cert"))
187+
errorOut = errorOut
188+
.Where(e => !string.IsNullOrWhiteSpace(e.Line))
189+
.Where(e => !e.Line.Contains("usage of JAVA_HOME is deprecated"))
190+
.Where(e => !e.Line.Trim().StartsWith("warning:"))
191+
.ToList();
192+
193+
if (errorOut.Any() && !binary.Contains("plugin") && !binary.Contains("cert"))
190194
throw new Exception(
191195
$"Received error out with exitCode ({result.ExitCode}) while executing {description}: {command}");
192196

0 commit comments

Comments
 (0)