From 9c9ce088193c2506da372c76685076bbfead0690 Mon Sep 17 00:00:00 2001 From: rorka900 Date: Fri, 24 Apr 2026 17:53:49 +0300 Subject: feat: modernize CLI with clap subcommands and add declarative apply --- src/update.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/update.rs') diff --git a/src/update.rs b/src/update.rs index 5deb228..9703d7a 100644 --- a/src/update.rs +++ b/src/update.rs @@ -40,7 +40,9 @@ pub fn upgrade_system(cfg: &config::Config) -> Result<(), String> { upgradable.join(", ").yellow() ); - parallel::install_packages_parallel(&upgradable, Arc::new(cfg.clone())) + let rt = tokio::runtime::Runtime::new() + .map_err(|e| format!("Failed to create async runtime: {}", e))?; + rt.block_on(parallel::install_packages_parallel(&upgradable, Arc::new(cfg.clone()))) } fn is_newer(current: &str, available: &str) -> bool { @@ -86,6 +88,7 @@ pub fn update_package(pkg_name: &str, cfg: &config::Config, dry_run: bool) -> bo true } +#[allow(dead_code)] pub fn resolve_recipe_path(name_or_path: &Path) -> PathBuf { if name_or_path.exists() { return name_or_path.to_path_buf(); @@ -100,6 +103,7 @@ pub fn resolve_recipe_path(name_or_path: &Path) -> PathBuf { name_or_path.to_path_buf() } +#[allow(dead_code)] pub fn rebuild_from_recipe(recipe_path: &Path, cfg: &config::Config) { let resolved = resolve_recipe_path(recipe_path); -- cgit v1.2.3