Skip to content

Commit a984e8a

Browse files
committed
bug fix
1 parent e6a7afc commit a984e8a

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/dfx/src/lib/builders/motoko.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,13 @@ impl MotokoBuilder {
165165
}
166166
};
167167

168+
std::fs::create_dir_all(motoko_info.get_output_root()).with_context(|| {
169+
format!(
170+
"Failed to create {}.",
171+
motoko_info.get_output_root().to_string_lossy()
172+
)
173+
})?;
174+
168175
let idl_dir_path = &config.idl_root;
169176
std::fs::create_dir_all(idl_dir_path)
170177
.with_context(|| format!("Failed to create {}.", idl_dir_path.to_string_lossy()))?;
@@ -321,14 +328,7 @@ impl CanisterBuilder for MotokoBuilder {
321328
.map(|c| (c.canister_id().to_text(), c.get_name().to_string()))
322329
.collect();
323330

324-
std::fs::create_dir_all(motoko_info.get_output_root()).with_context(|| {
325-
format!(
326-
"Failed to create {}.",
327-
motoko_info.get_output_root().to_string_lossy()
328-
)
329-
})?;
330331
let cache = &self.cache;
331-
332332
get_imports(cache.as_ref(), &motoko_info, &mut *pool.imports.borrow_mut(), pool)?;
333333

334334
self.do_build(

0 commit comments

Comments
 (0)