Skip to content

Commit

Permalink
feat(idl-gen): allow non-existing dirs in path for 'generate_idl_to_f…
Browse files Browse the repository at this point in the history
…ile' (#472)
  • Loading branch information
DennisInSky authored Aug 15, 2024
1 parent f090dc5 commit 868cf04
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions rs/idl-gen/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ pub mod program {
return Ok(());
}
}
if let Some(dir_path) = path.as_ref().parent() {
fs::create_dir_all(dir_path)?;
}
Ok(fs::write(&path, idl_new_content)?)
}
}
Expand Down

0 comments on commit 868cf04

Please sign in to comment.