Record added marketplaces in local registry

This commit is contained in:
xli-oai
2026-04-08 10:32:47 -07:00
parent b8a9e8870a
commit faaff79b41
5 changed files with 122 additions and 1 deletions
+3
View File
@@ -5,6 +5,7 @@ use clap::Parser;
use codex_core::config::find_codex_home;
use codex_core::plugins::OPENAI_CURATED_MARKETPLACE_NAME;
use codex_core::plugins::marketplace_install_root;
use codex_core::plugins::record_installed_marketplace_root;
use codex_core::plugins::validate_marketplace_root;
use codex_utils_cli::CliConfigOverrides;
use std::fs;
@@ -162,6 +163,8 @@ async fn run_add(args: AddMarketplaceArgs) -> Result<()> {
ensure_marketplace_destination_is_inside_install_root(&install_root, &destination)?;
replace_marketplace_root(&staged_root, &destination)
.with_context(|| format!("failed to install marketplace at {}", destination.display()))?;
record_installed_marketplace_root(&codex_home, &marketplace_name, &destination)
.with_context(|| format!("failed to record marketplace `{marketplace_name}`"))?;
println!(
"Added marketplace `{marketplace_name}` from {}.",