Skip to content

Commit 2a25811

Browse files
Create out_dir (usually "pkg") if it does not exist
1 parent eaaf346 commit 2a25811

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

crates/cli-support/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,7 @@ impl Bindgen {
350350
} else {
351351
"js"
352352
};
353+
fs::create_dir_all(out_dir)?;
353354
let js_path = out_dir.join(stem).with_extension(extension);
354355
fs::write(&js_path, reset_indentation(&js))
355356
.with_context(|_| format!("failed to write `{}`", js_path.display()))?;

0 commit comments

Comments
 (0)