From 9215820374d032d4963e0aa2016d3ff317b570e6 Mon Sep 17 00:00:00 2001 From: Luke Harding Date: Tue, 30 Apr 2024 18:50:30 -0400 Subject: [PATCH] Extract main to update Extracted most of the functionality from main into a new update fn. This is to allow room for command flags. --- src/main.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main.rs b/src/main.rs index 542aa09..66ee701 100644 --- a/src/main.rs +++ b/src/main.rs @@ -21,6 +21,10 @@ mod wrappers; fn main() { println!("{}", copyright_notice()); + update(); +} + +fn update() { if let Err(e) = pacman::check() { error_println(e.to_string()); return;