Fix #18086: suppress NuGet restore stdout under FSI --quiet#19808
Fix #18086: suppress NuGet restore stdout under FSI --quiet#19808T-Gro wants to merge 4 commits into
Conversation
When --quiet (tcConfigB.noFeedback) is active, route the captured stdout of the NuGet restore subprocess to stderr instead of stdout so that warnings like NU1608 and MSBuild `Determining projects to restore...` chatter no longer pollute FSI stdout. Default (non-quiet) behavior is unchanged. result.StdError continues to go to stderr unconditionally. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
❗ Release notes required
Warning No PR link found in some release notes, please consider adding it.
|
T-Gro
left a comment
There was a problem hiding this comment.
Review: LGTM - Clean, well-targeted fix.
The change correctly routes NuGet restore stdout to Console.Error under --quiet mode while preserving it for users who redirect stderr. This is a reasonable design choice — slightly different from other noFeedback paths that use nullOut (full discard), but defensible since this is external process output that users may still want access to.
Tests are well-structured and cover the key scenarios (quiet suppresses NuGet chatter, default mode still works, user output still reaches stdout).
Minor suggestion: Consider adding Assert.Equal(0, result.ExitCode) in the FSI quiet mode suppresses NuGet restore output from stdout test for extra robustness — if NuGet resolution fails due to network issues, the test would fail with a clearer signal than the marker assertion.
Summary
When --quiet ( cConfigB.noFeedback) is active, route the captured stdout of the NuGet restore subprocess to stderr instead of stdout so that warnings like NU1608 and MSBuild
Determining projects to restore...chatter no longer pollute FSI stdout.Default (non-quiet) behavior is unchanged.
esult.StdError continues to go to stderr unconditionally.
Changes
oFeedback is set, redirect restore stdout to stderr instead of stdout.
Fixes #18086