Fix flipped detect bool and readded `diff`

i18n
Michal S 2 years ago committed by Michal
parent 3842402ddc
commit 7478aeb2d3

@ -49,12 +49,6 @@ pub async fn detect() {
if choice {
let config = Config::get();
if config.base.pacdiff_warn {
ShellCommand::pacdiff()
.elevated()
.wait()
.await
.silent_unwrap(AppExitCode::PacmanError);
} else {
tracing::warn!("Pacdiff uses vimdiff by default to edit files for merging. You can focus panes by mousing over them and pressing left click, and scroll up and down using your mouse's scroll wheel (or the arrow keys). To exit vimdiff, press the following key combination: ESC, :qa!, ENTER");
tracing::warn!("You can surpress this warning in the future by setting `pacdiff_warn` to \"false\" in ~/.config/ame/config.toml");
@ -65,6 +59,12 @@ pub async fn detect() {
.await
.silent_unwrap(AppExitCode::PacmanError);
}
} else {
ShellCommand::pacdiff()
.elevated()
.wait()
.await
.silent_unwrap(AppExitCode::PacmanError);
}
}
}

@ -3,6 +3,7 @@ use builder::pacman::{PacmanColor, PacmanQueryBuilder};
use clap::Parser;
use internal::commands::ShellCommand;
use internal::detect;
use internal::error::SilentUnwrap;
use crate::args::{InstallArgs, Operation, QueryArgs, RemoveArgs};
@ -68,7 +69,7 @@ async fn main() {
operations::clean(options).await;
}
Operation::GenComp(gen_args) => cmd_gencomp(&gen_args),
Operation::Diff => todo!(),
Operation::Diff => detect().await,
}
}

Loading…
Cancel
Save