ejrgilbert / whamm

5 stars 2 forks source link

Failed default output_path becuase parent directory doesn't exists #27

Closed ahuoguo closed 2 weeks ago

ahuoguo commented 1 month ago

If I don't have the output directory, running cargo run -- vis-script --script tests/scripts/fault_injection/dfinity_sync.mm will give error

Error: Could not open "<OMITTED>/whamm-fork/output/vis.svg" for writing : No such file or directory

We can create the parent directory if it doesn't exist and reduce the assumption for user by putting std::fs::create_dir_all somewhere