Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the output directory if it doesn't already exist. #65

Merged
merged 1 commit into from
Mar 15, 2022
Merged

Conversation

theoxo
Copy link
Collaborator

@theoxo theoxo commented Mar 15, 2022

Addresses #38.

println!("Wrote to {:?}",args.out);
let out_path = &args.out;
if let Some(out_path_dir) = out_path.parent() {
if !out_path_dir.exists() {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The double if is a bit ugly but it's necessary because "if"s and "if let"s are disjoint. Rust has implemented a fix to this (see here), but it's not in the stable branch yet.

@mlb2251
Copy link
Owner

mlb2251 commented Mar 15, 2022

LGTM

@theoxo theoxo merged commit 910b97d into main Mar 15, 2022
@theoxo theoxo mentioned this pull request Mar 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants