minor improvements
This commit is contained in:
12
src/main.rs
12
src/main.rs
@@ -43,9 +43,9 @@ fn main() -> io::Result<()> {
|
||||
}
|
||||
|
||||
match distro {
|
||||
"arch" => arch_choices(input)?, // Pass the input value here
|
||||
"Debian" => debian_choices(input)?, // Pass the input value here
|
||||
"fedora" => fedora_choices(input)?, // Pass the input value here
|
||||
"arch" => arch_choices(input)?,
|
||||
"Debian" => debian_choices(input)?,
|
||||
"fedora" => fedora_choices(input)?,
|
||||
_ => return Err(io::Error::new(io::ErrorKind::NotFound, "Unsupported distro")),
|
||||
};
|
||||
}
|
||||
@@ -235,6 +235,10 @@ fn update_system() -> Result<(), Box<dyn std::error::Error>> {
|
||||
_ => eprint!("Unsupported distro")
|
||||
};
|
||||
|
||||
if which("flatpak").is_some() {
|
||||
Command::new("flatpak").arg("update").status()?;
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@@ -248,7 +252,7 @@ fn aur() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let choice: Vec<String> = buffer.lines().map(|line| line.to_string()).collect();
|
||||
|
||||
if which("yay").is_none() {
|
||||
eprint!("AUR helper not found. Install yay Y/N? (1/0)");
|
||||
eprint!("yay not found. Install yay Y/N? (1/0)");
|
||||
let input = handle_int_input();
|
||||
if input == 1 {
|
||||
Command::new("sudo").arg("pacman").arg("-S").arg("git").arg("base-devel").status()?;
|
||||
|
||||
Reference in New Issue
Block a user