diff --git a/radicle-cli/examples/rad-id-private.md b/radicle-cli/examples/rad-id-private.md index 05262694..63998838 100644 --- a/radicle-cli/examples/rad-id-private.md +++ b/radicle-cli/examples/rad-id-private.md @@ -62,17 +62,16 @@ $ rad id update --title "Remove allow list" --allow did:key:z6Mkt67GdsW7715MEfRu ✗ Error: `--allow` and `--disallow` must not overlap: ["did:key:z6Mkt67GdsW7715MEfRuP4pSZxJRJh6kj6Y48WRqVv4N1tRk"] ``` -Allowing or disallowing the same peer twice will result in an error the second -call, since there is no update specified: +Allowing or disallowing the same peer twice will result in a message saying that +the document is already up to date: ``` $ rad id update --title "Allow Bob" --allow did:key:z6Mkt67GdsW7715MEfRuP4pSZxJRJh6kj6Y48WRqVv4N1tRk -q ... ``` -``` (fails) -$ rad id update --title "Allow Bob" --allow did:key:z6Mkt67GdsW7715MEfRuP4pSZxJRJh6kj6Y48WRqVv4N1tRk -q -✗ Error: no update specified -✗ Hint: an update to the identity must be specified, run `rad id update -h` to see the available options +``` +$ rad id update --title "Allow Bob" --allow did:key:z6Mkt67GdsW7715MEfRuP4pSZxJRJh6kj6Y48WRqVv4N1tRk +Nothing to do. The document is up to date. See `rad inspect --identity`. ``` If we attempt to change the list while also changing the repository to `public`, diff --git a/radicle-cli/examples/rad-id-update-delete-field.md b/radicle-cli/examples/rad-id-update-delete-field.md index b34cbd4b..7f80573c 100644 --- a/radicle-cli/examples/rad-id-update-delete-field.md +++ b/radicle-cli/examples/rad-id-update-delete-field.md @@ -74,5 +74,5 @@ Note that we cannot delete mandatory fields: ``` (fails) $ rad id update --title "Delete default branch" --payload xyz.radicle.project defaultBranch null -✗ Error: failed to verify `xyz.radicle.project`, failed with json: missing field `defaultBranch` +✗ Error: failed to verify `xyz.radicle.project`, json: missing field `defaultBranch` ``` diff --git a/radicle-cli/examples/rad-id.md b/radicle-cli/examples/rad-id.md index 259c8456..2bc93ed8 100644 --- a/radicle-cli/examples/rad-id.md +++ b/radicle-cli/examples/rad-id.md @@ -174,10 +174,9 @@ $ rad id accept 0ca42d376bd566631083c8913cf86bec722da392 ✗ Error: [..] ``` -If no updates are specified then the update will fail: +If no updates are specified then we are told that our command had no effect: -``` (fail) -$ rad id update --title "Update canonical branch" --description "Update the canonical branch to `main`" -✗ Error: no update specified -✗ Hint: an update to the identity must be specified, run `rad id update -h` to see the available options +``` +$ rad id update --title "Update canonical branch" --description "Update the canonical branch to `main`" +Nothing to do. The document is up to date. See `rad inspect --identity`. ``` diff --git a/radicle-cli/src/commands/id.rs b/radicle-cli/src/commands/id.rs index 2e5a5d2e..fe8b358b 100644 --- a/radicle-cli/src/commands/id.rs +++ b/radicle-cli/src/commands/id.rs @@ -465,15 +465,15 @@ pub fn run(options: Options, ctx: impl term::Context) -> anyhow::Result<()> { // Verify that the project payload can still be parsed into the // `Project` type. if let Err(e) = proposal.project() { - anyhow::bail!("failed to verify `xyz.radicle.project`, failed with {e}",); + anyhow::bail!("failed to verify `xyz.radicle.project`, {e}"); } proposal }; if proposal == current.doc { - return Err(Error::WithHint { - err: anyhow!("no update specified"), - hint: "an update to the identity must be specified, run `rad id update -h` to see the available options" - }.into()); + term::print(term::format::italic( + "Nothing to do. The document is up to date. See `rad inspect --identity`.", + )); + return Ok(()); } let revision = update(title, description, proposal, &mut identity, &signer)?;