diff --git a/src/cli/mod.rs b/src/cli/mod.rs index f8a3b795..102efafc 100644 --- a/src/cli/mod.rs +++ b/src/cli/mod.rs @@ -18,9 +18,7 @@ use self::subcommand::NixInstallerSubcommand; const FAIL_PKG_SUGGEST: &str = "\ The Determinate Nix Installer failed. -Try our macOS-native package instead, which can handle almost anything: - -https://dtr.mn/determinate-nix\ +Try our macOS-native package instead, which can handle almost anything: https://dtr.mn/determinate-nix\ "; #[async_trait::async_trait] @@ -109,7 +107,7 @@ impl CommandExecute for NixInstallerCli { .get_feature_ptr_payload::("dni-det-msg-fail-pkg-ptr") .await .unwrap_or(FAIL_PKG_SUGGEST.into()); - tracing::warn!("{}", msg); + tracing::warn!("{}\n", msg.trim()); return Ok(ExitCode::FAILURE); } diff --git a/src/cli/subcommand/install.rs b/src/cli/subcommand/install.rs index a2859bf2..c688263b 100644 --- a/src/cli/subcommand/install.rs +++ b/src/cli/subcommand/install.rs @@ -132,7 +132,7 @@ impl CommandExecute for Install { .get_feature_ptr_payload::("dni-det-msg-start-pkg-ptr") .await .unwrap_or(PRE_PKG_SUGGEST.into()); - tracing::info!("{}", msg); + tracing::info!("{}", msg.trim()); } let mut post_install_message = None; @@ -208,9 +208,13 @@ impl CommandExecute for Install { loop { let prompt = if currently_explaining { - &format!("\n{}\n{explanation}\n", base_prompt.green()) + &format!( + "\n{}\n{}\n", + base_prompt.trim().green(), + explanation.trim() + ) } else { - &format!("\n{}", base_prompt.green()) + &format!("\n{}", base_prompt.trim().green()) }; let response = interaction::prompt( @@ -404,7 +408,7 @@ impl CommandExecute for Install { ); if let Some(post_message) = post_install_message { - println!("{post_message}"); + println!("{}", post_message.trim()); } }, }