fix: suppress update banner in machine mode (--json / --quiet)#201
Merged
felipefreitag merged 4 commits intomainfrom Apr 10, 2026
Merged
fix: suppress update banner in machine mode (--json / --quiet)#201felipefreitag merged 4 commits intomainfrom
felipefreitag merged 4 commits intomainfrom
Conversation
The background update notifier ignored explicit machine-mode flags (--json / --quiet) and still wrote an update banner to stderr when running in a TTY. This broke the documented machine-mode contract that promises 'JSON to stdout, nothing to stderr'. - Add UpdateCheckOptions type to checkForUpdates accepting a json flag - Pass resolved global opts (json || quiet) from cli.ts into checkForUpdates - Short-circuit shouldSkipCheck when json is true - Add regression tests covering TTY + --json, TTY + --quiet, and explicit json: false scenarios Resolves: BU-651 Co-authored-by: Bu Kinoshita <bukinoshita@users.noreply.github.com>
Member
Author
|
@cubic-dev-ai can you review? |
Contributor
@bukinoshita I have started the AI code review. It will take a few minutes to complete. |
felipefreitag
approved these changes
Apr 10, 2026
Keep the PR's machine-mode suppression logic (passing json option to checkForUpdates) while adopting main's void prefix style.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary by cubic
Suppress the update banner in machine mode so
--jsonor--quietruns produce no stderr output, honoring the “JSON to stdout, nothing to stderr” contract. Resolves BU-651 by preventing noisy TTY runs from breaking automation.UpdateCheckOptionsand updatedshouldSkipCheckto short-circuit whenjsonis true.json: Boolean(globals.json || globals.quiet)fromsrc/cli.tsintocheckForUpdates.--json,--quiet(cached), and explicitjson: false.Written for commit 7a6933f. Summary will update on new commits.