Fix --format yaml and toml output#1653
Merged
Merged
Conversation
7 tasks
Code Coverage
|
jglogan
approved these changes
Jun 5, 2026
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.
--format yamlbut emit table or plain text #1528.Type of Change
Motivation and Context
Several commands (
builder status, image list, stats, system df, system status) advertised--format yamland--format tomlbut only handledjson, and every other format fell through to the table. With this PR, we now route them through one shared renderer with an exhaustive switch over the format enum, so a missing format would now be a compile error, and not just fail silently.Few more things to note:
itemskey, bec otherwise it was returning nothing for lists.statsnow prints one static result for machine readable formats instead of opening its live table view.builder statusnow returns an empty list for json/yaml/toml when no builder is running, instead of the unparseable "builder is not running" text. The table view keeps the message.-qand no builder it now exits 0 with no output, earlier it exited non-zero.Testing