From a16be2451791e0798851ca67bc810854215c93f4 Mon Sep 17 00:00:00 2001 From: Alexis Sellier Date: Wed, 19 Apr 2023 17:37:24 +0200 Subject: [PATCH] node: Fix log output in `--help` The logs were being output in the help text. --- radicle-node/src/main.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/radicle-node/src/main.rs b/radicle-node/src/main.rs index 18d7f857..8516fabe 100644 --- a/radicle-node/src/main.rs +++ b/radicle-node/src/main.rs @@ -29,7 +29,6 @@ Options --force Force start even if an existing control socket is found --help Print help --listen
Address to listen on - "#; #[derive(Debug)] @@ -134,14 +133,13 @@ impl Options { fn execute() -> anyhow::Result<()> { logger::init(log::Level::Debug)?; + let options = Options::from_env()?; + log::info!(target: "node", "Starting node.."); log::info!(target: "node", "Version {} ({})", env!("CARGO_PKG_VERSION"), env!("GIT_HEAD")); - - let options = Options::from_env()?; - let home = profile::home()?; - log::info!(target: "node", "Unlocking node keystore.."); + let home = profile::home()?; let passphrase = term::io::passphrase(profile::env::RAD_PASSPHRASE) .context(format!("`{}` must be set", profile::env::RAD_PASSPHRASE))?; let keystore = Keystore::new(&home.keys());