diff options
| author | rorka900 <rorka900@gmail.com> | 2026-04-24 17:53:49 +0300 |
|---|---|---|
| committer | rorka900 <rorka900@gmail.com> | 2026-04-24 17:53:49 +0300 |
| commit | 9c9ce088193c2506da372c76685076bbfead0690 (patch) | |
| tree | 8eacd30624a4d6da552f8de44a1e1273bfede3d4 /src/update.rs | |
| parent | f2ab400fb6750fbe017309757f06339437b7c4b8 (diff) | |
| download | ror-9c9ce088193c2506da372c76685076bbfead0690.tar.gz ror-9c9ce088193c2506da372c76685076bbfead0690.zip | |
feat: modernize CLI with clap subcommands and add declarative apply1.0.0-r1
Diffstat (limited to 'src/update.rs')
| -rw-r--r-- | src/update.rs | 6 |
1 files changed, 5 insertions, 1 deletions
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); |