fix(cli): idx config prints JSON only when JSON is asked for

Auto output stays plain text when piped, as in 0.3.2, so scripts that
read $(idx config path) or $(idx config get KEY) keep working; -o json,
IDX_OUTPUT=json, or general.output = "json" print JSON. The config
goldens return to their 0.3.2 content.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V3syn2fN2LNo5pvTSqc6eh
This commit is contained in:
hermes 2026-10-18 02:11:31 +00:00
commit 57eccc5843
10 changed files with 62 additions and 18 deletions

View file

@ -1,4 +1,4 @@
exit: 0
--- stdout
{"key":"general.provider","value":"msn"}
msn
--- stderr

View file

@ -1,4 +1,4 @@
exit: 0
--- stdout
{"path":"<ROOT>/config/idx/config.toml"}
<ROOT>/config/idx/config.toml
--- stderr

View file

@ -1,4 +1,4 @@
exit: 0
--- stdout
{"path":"<ROOT>/config/idx/config.toml"}
<ROOT>/config/idx/config.toml
--- stderr

View file

@ -1,4 +1,4 @@
exit: 0
--- stdout
{"key":"general.output","ok":true,"value":"jsonl"}
ok
--- stderr

View file

@ -1,4 +1,4 @@
exit: 0
--- stdout
{"key":"general.provider","ok":true,"value":"yahoo"}
ok
--- stderr