From a57de3b45e7497fcdeccfd0f2194ace46c61f34d Mon Sep 17 00:00:00 2001 From: FreddieKrugerrand Date: Wed, 1 Feb 2023 15:23:00 -0500 Subject: [PATCH] Prompt user to provide at least 2 arguments rather than 3 env::args returns the name of the binary, which isn't something the end user would think about. So while we require at least 3 arguments, it makes sense to only ask for 2. --- src/args.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/args.rs b/src/args.rs index a9d1729..b6ae379 100644 --- a/src/args.rs +++ b/src/args.rs @@ -10,7 +10,7 @@ use std::str::FromStr; pub(crate) fn parse_startup_args() -> Result { if env::args().len() < 3 { - println!("ldk-tutorial-node requires 3 arguments: `cargo run [:@]: ldk_storage_directory_path [] [bitcoin-network] [announced-node-name announced-listen-addr*]`"); + println!("ldk-tutorial-node requires at least 2 arguments: `cargo run [:@]: ldk_storage_directory_path [] [bitcoin-network] [announced-node-name announced-listen-addr*]`"); return Err(()); } let bitcoind_rpc_info = env::args().skip(1).next().unwrap(); -- 2.39.5