refactor and choose install

This commit is contained in:
2024-08-04 22:53:15 +02:00
parent f2f3997469
commit 085debe43c
10 changed files with 65 additions and 16 deletions

View File

@@ -1,10 +1,9 @@
use crate::packages::PACKAGE_MANAGER;
use crate::{file, packages::get_package_path};
use colored::Colorize;
use std::io::Write;
use std::process::{Command, Stdio};
const PACKAGE_MANAGER: &str = "paru";
pub fn install(new_packages: Vec<String>) -> Result<(), Box<dyn std::error::Error>> {
println!(
"{} {}",
@@ -24,7 +23,6 @@ pub fn install(new_packages: Vec<String>) -> Result<(), Box<dyn std::error::Erro
.arg("always")
.arg("-S")
.arg("--needed")
// .arg(noconfirm)
.arg("-")
.stdin(Stdio::piped())
.stdout(Stdio::inherit())