diff --git a/src/helpers.rs b/src/helpers.rs index 03bf97c9..55edc19a 100644 --- a/src/helpers.rs +++ b/src/helpers.rs @@ -9,6 +9,7 @@ use once_cell::sync::OnceCell; use reqwest::{Client, ClientBuilder, Method, Response}; use serde::Serialize; use tinytemplate::TinyTemplate; +use tokio::task::block_in_place; use url::Url; use crate::{BinstallError, Meta, PkgFmt, PkgFmtDecomposed, TarBasedFmt}; @@ -38,13 +39,15 @@ pub static REQWESTGLOBALCONFIG: OnceCell<(bool, Option)> = OnceCell: pub fn load_manifest_path>( manifest_path: P, ) -> Result, BinstallError> { - debug!("Reading manifest: {}", manifest_path.as_ref().display()); + block_in_place(|| { + debug!("Reading manifest: {}", manifest_path.as_ref().display()); - // Load and parse manifest (this checks file system for binary output names) - let manifest = Manifest::::from_path_with_metadata(manifest_path)?; + // Load and parse manifest (this checks file system for binary output names) + let manifest = Manifest::::from_path_with_metadata(manifest_path)?; - // Return metadata - Ok(manifest) + // Return metadata + Ok(manifest) + }) } pub fn new_reqwest_client_builder() -> ClientBuilder {