summaryrefslogtreecommitdiff
path: root/src/update.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/update.rs')
-rw-r--r--src/update.rs6
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);