mod batch;
pub mod command;
mod direct;
mod executor;
mod logging;
mod remove;
mod scan;
mod shell;
mod single;
mod utils;
pub use batch::spawn_install_all;
pub use logging::log_removed;
mod patterns;
pub use remove::{check_config_directories, spawn_remove_all};
#[cfg(not(target_os = "windows"))]
pub use scan::spawn::build_sleuth_command_for_terminal;
#[cfg(not(target_os = "windows"))]
#[allow(clippy::too_many_arguments)]
#[allow(clippy::fn_params_excessive_bools)]
pub fn spawn_aur_scan_for_with_config(
pkg: &str,
do_clamav: bool,
do_trivy: bool,
do_semgrep: bool,
do_shellcheck: bool,
do_virustotal: bool,
do_custom: bool,
do_sleuth: bool,
) {
let sets = crate::install::patterns::load();
unsafe {
std::env::set_var("PACSEA_PATTERNS_CRIT", &sets.critical);
}
unsafe {
std::env::set_var("PACSEA_PATTERNS_HIGH", &sets.high);
}
unsafe {
std::env::set_var("PACSEA_PATTERNS_MEDIUM", &sets.medium);
}
unsafe {
std::env::set_var("PACSEA_PATTERNS_LOW", &sets.low);
}
scan::spawn_aur_scan_for_with_config(
pkg,
do_clamav,
do_trivy,
do_semgrep,
do_shellcheck,
do_virustotal,
do_custom,
do_sleuth,
);
}
pub use direct::{
start_integrated_install, start_integrated_install_all, start_integrated_remove_all,
};
#[cfg(not(target_os = "windows"))]
pub use executor::build_scan_command_for_executor;
pub use executor::{
ExecutorOutput, ExecutorRequest, build_downgrade_command_for_executor,
build_install_command_for_executor, build_remove_command_for_executor,
build_update_command_for_executor,
};
pub use shell::spawn_shell_commands_in_terminal;
pub use single::spawn_install;
#[cfg(not(target_os = "windows"))]
pub use utils::editor_open_config_command;
pub use utils::shell_single_quote;
pub use utils::{command_on_path, resolve_command_on_path};