From 2aaa640fe9127d359b244871689c7006c7df69d6 Mon Sep 17 00:00:00 2001 From: MordechaiHadad Date: Tue, 5 Nov 2024 12:42:28 +0200 Subject: [PATCH] fix some messages and prompt --- src/handlers/use_handler.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/handlers/use_handler.rs b/src/handlers/use_handler.rs index 3dfbd54..a9359ac 100644 --- a/src/handlers/use_handler.rs +++ b/src/handlers/use_handler.rs @@ -310,10 +310,13 @@ async fn copy_file_with_error_handling(old_path: &Path, new_path: &Path) -> Resu async fn add_to_path(installation_dir: PathBuf, config: ConfigFile) -> Result<()> { let installation_dir = installation_dir.to_str().unwrap(); - if what_the_path::shell::exists_in_path("nvim-bin") - || config.config.add_neovim_binary_to_path == Some(false) + if what_the_path::shell::exists_in_path("nvim-bin"){ + return Ok(()); + } + + if config.config.add_neovim_binary_to_path == Some(false) { - info!("Make sure to have {installation_dir} in PATH"); + info!("Make sure to add {installation_dir} to $PATH"); return Ok(()); }