diff --git a/src/internal/detect.rs b/src/internal/detect.rs index 621475c..ba3f1b7 100644 --- a/src/internal/detect.rs +++ b/src/internal/detect.rs @@ -1,7 +1,7 @@ use crate::internal::commands::ShellCommand; use crate::internal::error::SilentUnwrap; use crate::internal::exit_code::AppExitCode; -use crate::internal::strings::prompt; +use crate::internal::strings::{prompt, warn}; pub fn detect() { let mut pacnew = vec![]; @@ -16,12 +16,16 @@ pub fn detect() { } if !pacnew.is_empty() { - let choice = prompt("It appears that at least one program you have installed / upgraded has installed a .pacnew/.pacsave config file. Would you like to run pacdiff to deal with this?".to_string(), true); + let choice = prompt("It appears that at least one program you have installed / upgraded has installed a .pacnew/.pacsave config file. Would you like to run pacdiff to deal with this? You can always deal with this later by running `sudo pacdiff`".to_string(), false); if choice { - ShellCommand::pacdiff() - .elevated() - .wait() - .silent_unwrap(AppExitCode::PacmanError); + warn("Unless you've set an alternative using the DIFFPROG environment variable, pacdiff uses `vimdiff` by default to edit files for merging. Make sure you know how to exit vim before proceeding".to_string()); + let cont = prompt("Continue?".to_string(), false); + if cont { + ShellCommand::pacdiff() + .elevated() + .wait() + .silent_unwrap(AppExitCode::PacmanError); + } } } } diff --git a/src/internal/strings.rs b/src/internal/strings.rs index b2340c2..ea48672 100644 --- a/src/internal/strings.rs +++ b/src/internal/strings.rs @@ -13,7 +13,6 @@ pub fn info(msg: S) { println!("\x1b[2;22;35m❖\x1b[0m \x1b[1;37m{}\x1b[0m", a) } -#[allow(dead_code)] pub fn warn(msg: S) { let a = msg.to_string(); let a = if internal::uwu_enabled() { uwu!(&a) } else { a }; diff --git a/src/main.rs b/src/main.rs index 81f38e7..b163739 100644 --- a/src/main.rs +++ b/src/main.rs @@ -6,8 +6,7 @@ use internal::error::SilentUnwrap; use crate::args::{InstallArgs, Operation, QueryArgs, RemoveArgs, SearchArgs}; use crate::internal::detect; use crate::internal::exit_code::AppExitCode; -#[allow(unused_imports)] -use crate::internal::{crash, info, init, log, prompt, sort, structs::Options, warn}; +use crate::internal::{crash, info, init, log, prompt, sort, structs::Options}; #[global_allocator] static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;