Skip to content

Commit

Permalink
chore: create dir after checks
Browse files Browse the repository at this point in the history
  • Loading branch information
curryrasul committed Jun 6, 2024
1 parent d9320f6 commit 2e4dcc6
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,13 @@ fn main() -> Result<(), ProgramError> {

let args = Args::parse();

let output_dir = args.output.clone();
let circuit = build_circuit(&args)?;
let report = circuit.generate_circuit_report()?;

let output_dir = args.output.clone();
fs::create_dir_all(output_dir.clone())
.map_err(|_| ProgramError::OutputDirectoryCreationError)?;

let circuit = build_circuit(&args)?;
let report = circuit.generate_circuit_report()?;

let output_file_path = build_output(
&output_dir,
args.input.file_stem().unwrap().to_str().unwrap(),
Expand Down

0 comments on commit 2e4dcc6

Please sign in to comment.