Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
cli: Make sure we sync inventory before announcing
cloudhead committed 2 years ago
commit 1ab1da1ba196ec3fd7ed6b15198f4b4093bb4e6c
parent 112c940d8168cbcf1fef3b3f32c03296aa32e179
2 files changed +1 -1
modified 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`",
modified 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();