diff --git a/schema/mise.json b/schema/mise.json index 610d29d9a0..f85482b349 100644 --- a/schema/mise.json +++ b/schema/mise.json @@ -838,6 +838,10 @@ { "description": "option to pass to tool", "type": "string" + }, + { + "description": "option to pass to tool", + "type": "boolean" } ] } diff --git a/src/config/config_file/mise_toml.rs b/src/config/config_file/mise_toml.rs index 3c28c47e61..a38aabc282 100644 --- a/src/config/config_file/mise_toml.rs +++ b/src/config/config_file/mise_toml.rs @@ -907,9 +907,20 @@ impl<'de> de::Deserialize<'de> for MiseTomlToolList { return Err(de::Error::custom("os must be a string or array")); } }, - _ => { - options.insert(k, v.as_str().unwrap().to_string()); - } + _ => match v { + toml::Value::Boolean(v) => { + options.insert(k, v.to_string()); + } + toml::Value::Integer(v) => { + options.insert(k, v.to_string()); + } + toml::Value::String(v) => { + options.insert(k, v); + } + _ => { + return Err(de::Error::custom("invalid value type")); + } + }, } } if let Some(tt) = tt {