Skip to content

Commit

Permalink
Merge pull request #239 from kinode-dao/hf/boot_fake_node-fix-offline
Browse files Browse the repository at this point in the history
boot-fake-node: fix offline cache-based-fallback
  • Loading branch information
nick1udwig authored Sep 16, 2024
2 parents 32e9d6a + a89c829 commit c8aa2e4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
4 changes: 1 addition & 3 deletions src/boot_fake_node/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -312,9 +312,7 @@ pub async fn find_releases_with_asset_if_online(
fn get_local_versions_with_prefix(prefix: &str) -> Result<Vec<String>> {
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();
Expand Down
13 changes: 9 additions & 4 deletions src/build/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -495,9 +495,16 @@ fn get_file_modified_time(file_path: &Path) -> Result<SystemTime> {

#[instrument(level = "trace", skip_all)]
fn get_cargo_package_path(package: &cargo_metadata::Package) -> Result<PathBuf> {
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
)),
}
}

Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit c8aa2e4

Please sign in to comment.