Skip to content

Commit

Permalink
Merge branch 'google:main' into test
Browse files Browse the repository at this point in the history
  • Loading branch information
VirxEC authored Feb 6, 2023
2 parents cb16073 + dcb4de8 commit 31ccc89
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions gen/cmd/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,14 @@ fn main() -> miette::Result<()> {

// Finally start to write the C++ and Rust out.
let outdir: PathBuf = matches.value_of_os("outdir").unwrap().into();

if !outdir.exists() {
use miette::WrapErr as _;
std::fs::create_dir_all(&outdir)
.into_diagnostic()
.wrap_err_with(|| format!("Failed to create `outdir` '{}'", outdir.display()))?;
}

let mut writer = FileWriter {
depfile: &depfile,
outdir: &outdir,
Expand Down

0 comments on commit 31ccc89

Please sign in to comment.