From d59d2b39adc557e991408d2bfebf36ab7f058264 Mon Sep 17 00:00:00 2001 From: hosted-fornet Date: Mon, 16 Sep 2024 14:51:23 -0700 Subject: [PATCH 1/2] boot-fake-node: fix offline cache-based-fallback --- src/boot_fake_node/mod.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/boot_fake_node/mod.rs b/src/boot_fake_node/mod.rs index 847fe5ba..0e8d1244 100644 --- a/src/boot_fake_node/mod.rs +++ b/src/boot_fake_node/mod.rs @@ -312,9 +312,7 @@ pub async fn find_releases_with_asset_if_online( fn get_local_versions_with_prefix(prefix: &str) -> Result> { let mut versions = Vec::new(); - let path = Path::new(prefix) - .parent() - .ok_or_else(|| eyre!("couldnt find directory with local runtimes"))?; + let path = Path::new(KIT_CACHE); for entry in fs::read_dir(&path)? { let entry = entry?; let path = entry.path(); From a89c829085e5616f2e255442d5cee318cdbb3c5d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 16 Sep 2024 21:52:44 +0000 Subject: [PATCH 2/2] Format Rust code using rustfmt --- src/build/mod.rs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/build/mod.rs b/src/build/mod.rs index 4b5dbaea..321bfa8d 100644 --- a/src/build/mod.rs +++ b/src/build/mod.rs @@ -495,9 +495,16 @@ fn get_file_modified_time(file_path: &Path) -> Result { #[instrument(level = "trace", skip_all)] fn get_cargo_package_path(package: &cargo_metadata::Package) -> Result { - match package.manifest_path.parent().map(|p| p.as_std_path().to_path_buf()) { + match package + .manifest_path + .parent() + .map(|p| p.as_std_path().to_path_buf()) + { Some(p) => Ok(p), - None => Err(eyre!("Cargo manifest path {} has no parent", package.manifest_path)), + None => Err(eyre!( + "Cargo manifest path {} has no parent", + package.manifest_path + )), } } @@ -563,8 +570,6 @@ fn is_up_to_date( Ok(false) } - - #[instrument(level = "trace", skip_all)] async fn compile_javascript_wasm_process( process_dir: &Path,