Skip to content

Commit b12fdf1

Browse files
authored
Quiet console capture until the last attempt (#2089)
1 parent 224b089 commit b12fdf1

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ navigation_title: Elastic Docs v3
44

55
# Welcome to Elastic Docs v3
66

7-
Elastic Docs V3 is our next-generation documentation platform designed to improve the experience of learning, using, and contributing to Elastic products. Built on a foundation of modern authoring tools and scalable infrastructure, V3 offers faster builds, streamlined versioning, and enhanced navigation to guide users through Elastic’s complex ecosystem.
7+
Elastic Docs V3 is our next-generation documentation platform designed to improve the experience of learning, using, and contributing to Elastic products. Built on a foundation of modern authoring tools and scalable infrastructure, V3 offers faster builds, streamlined versioning, and enhanced navigation to guide users through Elastic’s complex ecosystem.
88

99
## What do you want to do today?
1010

src/Elastic.Documentation/ExternalCommands/ExternalCommandExecutor.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ private string[] CaptureMultiple(bool muteExceptions, int attempts, string binar
6464
}
6565
catch (Exception ex)
6666
{
67-
collector.EmitGlobalWarning($"An exception occurred on attempt {i} to capture output of {binary}: {ex?.Message}");
6867
if (ex is not null)
6968
e = ex;
7069
}
@@ -84,7 +83,8 @@ string[] CaptureOutput(Exception? previousException, int iteration, int max)
8483
WorkingDirectory = workingDirectory.FullName,
8584
Timeout = TimeSpan.FromSeconds(3),
8685
WaitForExit = TimeSpan.FromSeconds(3),
87-
ConsoleOutWriter = new ConsoleOutWriter()
86+
// Capture the output of the command if it's the last iteration
87+
ConsoleOutWriter = iteration == max ? new ConsoleOutWriter() : NoopConsoleWriter.Instance,
8888
};
8989
var result = Proc.Start(arguments);
9090

0 commit comments

Comments
 (0)