From 28c8c8dfb0dff4dc87d585e06faaf96a4c2eefde Mon Sep 17 00:00:00 2001 From: nsfisis Date: Mon, 23 Feb 2026 01:06:57 +0900 Subject: fix(config): add missing keys, implement --absolute, fix output format Add 18 missing config keys to config_value_type() including cache-read-only (was in defaults but unmanageable), audit.* dotted keys, and bool-or-enum keys like store-auths and bump-after-update. Implement --absolute flag to resolve *-dir values to absolute paths. Fix render_value() to JSON-encode arrays and use lowercase "null", matching Composer output. Co-Authored-By: Claude Opus 4.6 --- crates/mozart/src/commands/config_helpers.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'crates/mozart/src/commands/config_helpers.rs') diff --git a/crates/mozart/src/commands/config_helpers.rs b/crates/mozart/src/commands/config_helpers.rs index 953f18b..31792f4 100644 --- a/crates/mozart/src/commands/config_helpers.rs +++ b/crates/mozart/src/commands/config_helpers.rs @@ -140,12 +140,12 @@ pub(crate) fn insert_repository( /// single-line display (matching Composer's behaviour). pub(crate) fn render_value(v: &serde_json::Value) -> String { match v { - serde_json::Value::Null => "NULL".to_string(), + serde_json::Value::Null => "null".to_string(), serde_json::Value::Bool(b) => if *b { "true" } else { "false" }.to_string(), serde_json::Value::Number(n) => n.to_string(), serde_json::Value::String(s) => s.clone(), - serde_json::Value::Array(arr) => { - arr.iter().map(render_value).collect::>().join(", ") + serde_json::Value::Array(_) => { + serde_json::to_string(v).unwrap_or_else(|_| "[]".to_string()) } serde_json::Value::Object(obj) => { if obj.is_empty() { -- cgit v1.3.1