Extract main to update

Extracted most of the functionality from main into a new update fn. This is to allow room for command flags.
This commit is contained in:
Luke Harding 2024-04-30 18:50:30 -04:00
parent ef2134a00b
commit 9215820374

View File

@ -21,6 +21,10 @@ mod wrappers;
fn main() { fn main() {
println!("{}", copyright_notice()); println!("{}", copyright_notice());
update();
}
fn update() {
if let Err(e) = pacman::check() { if let Err(e) = pacman::check() {
error_println(e.to_string()); error_println(e.to_string());
return; return;