mirror of
https://seed.radicle.dev/rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5.git
synced 2026-11-29 14:00:31 +08:00
cli: Make sure we sync inventory before announcing
This commit is contained in:
@@ -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`",
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user