From cde2027cbe14feb48fbe6c4db94c5e9e022b55ec Mon Sep 17 00:00:00 2001 From: Jon-Becker Date: Wed, 28 Aug 2024 11:08:31 -0400 Subject: [PATCH] fix(setup): trim endpoint url input --- rust/Cargo.lock | 4 ++-- rust/crates/mesc_cli/src/cli/subcommands/setup/endpoints.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/rust/Cargo.lock b/rust/Cargo.lock index e69a8ea..2af1046 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -1378,7 +1378,7 @@ dependencies = [ [[package]] name = "mesc" -version = "0.2.0" +version = "0.2.1" dependencies = [ "serde", "serde_json", @@ -1387,7 +1387,7 @@ dependencies = [ [[package]] name = "mesc_cli" -version = "0.2.0" +version = "0.2.1" dependencies = [ "bat", "clap", diff --git a/rust/crates/mesc_cli/src/cli/subcommands/setup/endpoints.rs b/rust/crates/mesc_cli/src/cli/subcommands/setup/endpoints.rs index 66c4013..aced8da 100644 --- a/rust/crates/mesc_cli/src/cli/subcommands/setup/endpoints.rs +++ b/rust/crates/mesc_cli/src/cli/subcommands/setup/endpoints.rs @@ -8,7 +8,7 @@ use super::{metadata::*, selectors::*}; pub(crate) async fn add_endpoint(config: &mut RpcConfig) -> Result<(), MescCliError> { let url = match inquire::Text::new("New endpoint URL?").prompt() { - Ok(input) => input, + Ok(input) => input.trim().to_string(), Err(InquireError::OperationCanceled) => return Ok(()), Err(_) => return Err(MescCliError::InvalidInput("invalid input".to_string())), };