diff --git a/src/backend/github.rs b/src/backend/github.rs index 6674f3874f..855d4728c1 100644 --- a/src/backend/github.rs +++ b/src/backend/github.rs @@ -254,7 +254,7 @@ impl Backend for UnifiedGitBackend { .config .get_tool_opts(&self.ba) .await? - .unwrap_or_else(|| tv.request.options()); + .unwrap_or_else(|| self.ba.opts()); let api_url = self.get_api_url(&opts); // Check if URL already exists in lockfile platforms first diff --git a/src/registry.rs b/src/registry.rs index 57965aef37..0b9c481390 100644 --- a/src/registry.rs +++ b/src/registry.rs @@ -131,7 +131,13 @@ impl RegistryTool { if let Some(backend) = self.get_backend(full) { for (k, v) in backend.options { - opts.insert(k.to_string(), toml::Value::String(v.to_string())); + // Try to parse as TOML to preserve nested table structure + // (e.g., platforms with per-platform options like asset_pattern) + let value = match toml::from_str::(v) { + Ok(parsed) if parsed.is_table() => parsed, + _ => toml::Value::String(v.to_string()), + }; + opts.insert(k.to_string(), value); } }