Skip to content

Commit

Permalink
ensure target/near dir exists
Browse files Browse the repository at this point in the history
  • Loading branch information
miraclx committed Aug 29, 2022
1 parent 3b3d52e commit 05f413f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cargo-near/src/abi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ pub(crate) fn write_to_file(
crate_metadata: &CrateMetadata,
generate_docs: bool,
) -> anyhow::Result<AbiResult> {
fs::create_dir_all(&crate_metadata.target_directory)?;

let original_cargo_toml: toml::value::Table =
toml::from_slice(&fs::read(&crate_metadata.manifest_path.path)?)?;

Expand Down

0 comments on commit 05f413f

Please sign in to comment.