Skip to content

Commit

Permalink
forgor suppression
Browse files Browse the repository at this point in the history
  • Loading branch information
Govorunb committed Jul 14, 2024
1 parent 214ada6 commit 5d23ae2
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions SCHIZO/Commands/Output/CommandOutputStack.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ public void ModifyForConsoleNautilus(CommandExecutionContext ctx)
{
Sinks.Clear();
Sinks.Push(new SetResultSink(ctx));
Sinks.Push(new SuppressOutputSink());
}

/// <summary>
Expand Down
14 changes: 14 additions & 0 deletions SCHIZO/Commands/Output/SuppressOutputSink.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using SCHIZO.Helpers;

namespace SCHIZO.Commands.Output;

public sealed class SuppressOutputSink : ISink
{
public bool TryConsume(ref object output)
{
if (MessageHelpers.SuppressOutput)
output = null;

return false;
}
}

0 comments on commit 5d23ae2

Please sign in to comment.