Skip to content

--json flag doing nothing#215

Merged
Cedric / ViaDézo1er (viadezo1er) merged 4 commits into
mainfrom
cedric/fix-output-not-json
Jun 1, 2026
Merged

--json flag doing nothing#215
Cedric / ViaDézo1er (viadezo1er) merged 4 commits into
mainfrom
cedric/fix-output-not-json

Conversation

@viadezo1er
Copy link
Copy Markdown
Contributor

@viadezo1er Cedric / ViaDézo1er (viadezo1er) commented May 30, 2026

bt --version, bt self update --check, bt init and bt switch did not respect --json.

Output after the fix:

bt --version --json
{"version":"0.10.0-canary.8bac725966d7"}
bt init --json
{"initialized":false,"org":"-/","path":"/path/to/repo/.bt/config.json","project":"My Project","status":"already-initialized"}
bt switch --json
✔ Select project · My Project
✔ Save to · Local (bt-output-not-json/.bt)
{"org":"-/","path":"/Users/cedric@braintrustdata.com/repos/bt-output-not-json/.bt/config.json","profile":"-/","project":"My Project","project_id":"e043bad5-7e28-48d9-acf9-bddb05a93394","scope":"local"}

self update outputs different flags depending on whether --check is passed. I think this is fine since the goal of the 2 commands is quite different.

bt self update --json --check
{"channel":"canary","current":"0.10.0-canary.47fd220f51c3","latest":"0.10.0-canary.4a8d89492987","up_to_date":false}

bt self update --json
{"channel":"canary","status":"completed"}

New behavior:
bt --version --json anything-subcommand-flags-whatever acts the same as bt --version --json.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 30, 2026

Latest downloadable build artifacts for this PR commit 91dc096a628b:

Available artifact names
  • ``artifacts-build-global
  • ``artifacts-build-local-aarch64-pc-windows-msvc
  • ``artifacts-build-local-x86_64-apple-darwin
  • ``artifacts-build-local-x86_64-pc-windows-msvc
  • ``artifacts-build-local-aarch64-apple-darwin
  • ``artifacts-build-local-x86_64-unknown-linux-musl
  • ``artifacts-build-local-x86_64-unknown-linux-gnu
  • ``artifacts-build-local-aarch64-unknown-linux-gnu
  • ``artifacts-plan-dist-manifest
  • ``cargo-dist-cache

@viadezo1er Cedric / ViaDézo1er (viadezo1er) marked this pull request as ready for review June 1, 2026 23:47
@viadezo1er Cedric / ViaDézo1er (viadezo1er) merged commit f341de5 into main Jun 1, 2026
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants