Skip to content

Commit

Permalink
temp: display wasm file path
Browse files Browse the repository at this point in the history
  • Loading branch information
burmecia committed Oct 23, 2024
1 parent 0b5722c commit 7b8bebd
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions wrappers/src/fdw/wasm_fdw/wasm_fdw.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,17 @@ fn download_component(
version: &str,
checksum: Option<&str>,
) -> WasmFdwResult<Component> {
if let Some(file_path) = url.strip_prefix("file://") {
return Ok(Component::from_file(engine, file_path)?);
}

report_info(&format!(
"==curr dir {}",
std::env::current_dir().unwrap().display()
));

report_info(&format!("==url {}", url));

if let Some(file_path) = url.strip_prefix("file://") {
return Ok(Component::from_file(engine, file_path)?);
}

if url.starts_with("warg://") || url.starts_with("wargs://") {
let url = url
.replacen("warg://", "http://", 1)
Expand Down Expand Up @@ -112,8 +114,6 @@ fn download_component(
fs::write(&path, bytes)?;
}

report_info(&format!("==path {}", path.display()));

Ok(Component::from_file(engine, &path).inspect_err(|_| {
// remove the cache file if it cannot be loaded as component
let _ = fs::remove_file(&path);
Expand Down

0 comments on commit 7b8bebd

Please sign in to comment.