From 93a9424b983ac090e0dfd779e788bfb516cacc26 Mon Sep 17 00:00:00 2001 From: aggarwalakshun Date: Fri, 25 Apr 2025 14:59:34 +0530 Subject: [PATCH] minor improvements --- src/main.rs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/main.rs b/src/main.rs index afaa315..b1f8eda 100644 --- a/src/main.rs +++ b/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> { _ => eprint!("Unsupported distro") }; + if which("flatpak").is_some() { + Command::new("flatpak").arg("update").status()?; + } + Ok(()) } @@ -248,7 +252,7 @@ fn aur() -> Result<(), Box> { let choice: Vec = 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()?;