Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
vporton committed Apr 15, 2024
1 parent e6a7afc commit a984e8a
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/dfx/src/lib/builders/motoko.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,13 @@ impl MotokoBuilder {
}
};

std::fs::create_dir_all(motoko_info.get_output_root()).with_context(|| {
format!(
"Failed to create {}.",
motoko_info.get_output_root().to_string_lossy()
)
})?;

let idl_dir_path = &config.idl_root;
std::fs::create_dir_all(idl_dir_path)
.with_context(|| format!("Failed to create {}.", idl_dir_path.to_string_lossy()))?;
Expand Down Expand Up @@ -321,14 +328,7 @@ impl CanisterBuilder for MotokoBuilder {
.map(|c| (c.canister_id().to_text(), c.get_name().to_string()))
.collect();

std::fs::create_dir_all(motoko_info.get_output_root()).with_context(|| {
format!(
"Failed to create {}.",
motoko_info.get_output_root().to_string_lossy()
)
})?;
let cache = &self.cache;

get_imports(cache.as_ref(), &motoko_info, &mut *pool.imports.borrow_mut(), pool)?;

self.do_build(
Expand Down

0 comments on commit a984e8a

Please sign in to comment.