From bbf87334e60408de1d72571f373d64f9f6bfd14c Mon Sep 17 00:00:00 2001 From: Zeke Foppa Date: Tue, 22 Oct 2024 12:07:21 -0700 Subject: [PATCH] [bfops/fix-error-message]: fix helptext --- crates/cli/src/config.rs | 8 ++++---- crates/cli/src/subcommands/identity.rs | 2 +- crates/cli/src/subcommands/server.rs | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/crates/cli/src/config.rs b/crates/cli/src/config.rs index a21e8b17c83..d7d983f4377 100644 --- a/crates/cli/src/config.rs +++ b/crates/cli/src/config.rs @@ -80,7 +80,7 @@ Or initialize a default identity with: format!( "Cannot verify tokens using invalid saved fingerprint from server: {server} Update the fingerprint with: -\tspacetime server fingerprint -s {server}", +\tspacetime server fingerprint {server}", ) })?; decode_token(&decoder, &id.token).map_err(|_| { @@ -120,13 +120,13 @@ const NO_DEFAULT_SERVER_ERROR_MESSAGE: &str = "No default server configuration. Set an existing server as the default with: \tspacetime server set-default Or add a new server which will become the default: -\tspacetime server add --default"; +\tspacetime server add {server} --default"; fn no_such_server_error(server: &str) -> anyhow::Error { anyhow::anyhow!( "No such saved server configuration: {server} Add a new server configuration with: -\tspacetime server add ", +\tspacetime server add {server} --url ", ) } @@ -973,7 +973,7 @@ Import an existing identity with: format!( "Unable to parse invalid saved server fingerprint as ECDSA public key. Update the server's fingerprint with: -\tspacetime server fingerprint -s {}", +\tspacetime server fingerprint {}", server.unwrap_or("") ) }) diff --git a/crates/cli/src/subcommands/identity.rs b/crates/cli/src/subcommands/identity.rs index c1d1e3d5ff5..296f5f3cc67 100644 --- a/crates/cli/src/subcommands/identity.rs +++ b/crates/cli/src/subcommands/identity.rs @@ -393,7 +393,7 @@ async fn exec_list(config: Config, args: &ArgMatches) -> Result<(), anyhow::Erro format!( "Cannot list identities for server without a saved fingerprint: {server_name} Fetch the server's fingerprint with: -\tspacetime server fingerprint -s {server_name}" +\tspacetime server fingerprint {server_name}" ) })?; let default_identity = config.get_default_identity_config(server).ok().map(|cfg| cfg.identity); diff --git a/crates/cli/src/subcommands/server.rs b/crates/cli/src/subcommands/server.rs index 0e0bb285532..03c6675ab1d 100644 --- a/crates/cli/src/subcommands/server.rs +++ b/crates/cli/src/subcommands/server.rs @@ -216,7 +216,7 @@ pub async fn exec_add(mut config: Config, args: &ArgMatches) -> Result<(), anyho "Unable to retrieve fingerprint for server: {url} Is the server running? Add a server without retrieving its fingerprint with: -\tspacetime server add {url} --no-fingerprint", +\tspacetime server add --url {url} --no-fingerprint", ) })?; println!("For server {}, got fingerprint:\n{}", url, fingerprint);