diff --git a/radicle-cli/src/commands/publish.rs b/radicle-cli/src/commands/publish.rs index e8c5eea1..5c6d8a2b 100644 --- a/radicle-cli/src/commands/publish.rs +++ b/radicle-cli/src/commands/publish.rs @@ -80,7 +80,6 @@ pub fn run(options: Options, ctx: impl term::Context) -> anyhow::Result<()> { let mut doc = doc.verified()?; if doc.visibility.is_public() { - // TODO: We need to sync inventory too if it's not in the routing table. return Err(Error::WithHint { err: anyhow!("repository is already public"), hint: "to announce the repository to the network, run `rad sync --inventory`", diff --git a/radicle-cli/src/commands/sync.rs b/radicle-cli/src/commands/sync.rs index de407a80..4d009313 100644 --- a/radicle-cli/src/commands/sync.rs +++ b/radicle-cli/src/commands/sync.rs @@ -300,6 +300,7 @@ pub fn announce_inventory(mut node: Node) -> anyhow::Result<()> { let peers = node.sessions()?.iter().filter(|s| s.is_connected()).count(); let spinner = term::spinner(format!("Announcing inventory to {peers} peers..")); + node.sync_inventory()?; node.announce_inventory()?; spinner.finish();