You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[rush] rush alert should honor -q and --json and similar #5228
When rush alerts is used, utilities that rely on output could fail if the alert is triggered. shouldRestrictConsoleOutput should probably be honored on rush alerts.
Repro steps
run any command that relies on output, like rush list --json | jq
Expected result:
Only JSON should be written to STDOUT
Actual result:
Rush alerts are written to stdout, resulting in an error
jq: parse error: Invalid numeric literal at line 4015, column 0
Details
Standard questions
Please answer these questions to help us investigate your issue more quickly:
Activity
iclanton commentedon May 28, 2025
Looks like this was an oversight when that feature was implemented. Should be a fairly easy fix.
AryanBagade commentedon Sep 3, 2025
Hi! Ian Clanton-Thuon (@iclanton) I’d like to take this issue, could you please assign it to me?
Proposed approach:
shouldRestrictConsoleOutput()for Rush alerts so-q/--quietand--jsonsuppress the alert banner.if (!RushCommandLineParser.shouldRestrictConsoleOutput()) {
await rushAlerts.printAlertsAsync();
}
Rationale:
rush list --json | jqemit only JSON.rush alertbehavior unchanged.Tests:
--jsonor-qis present, and JSON remains valid.If this direction looks good, I’ll proceed from branch
fix/5228-alert-honor-quiet-json. Thanks!