Skip to content

Commit

Permalink
fix: ensure that backends_directory always exists
Browse files Browse the repository at this point in the history
  • Loading branch information
TomAFrench committed Sep 4, 2023
1 parent 860278f commit a99f270
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions crates/nargo_cli/src/backends.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ fn active_backend_file_path() -> PathBuf {
}

pub(crate) fn set_active_backend(backend_name: &str) {
std::fs::create_dir_all(
active_backend_file_path().parent().expect("active backend file should have parent"),
)
.unwrap();
std::fs::write(active_backend_file_path(), backend_name.as_bytes()).unwrap();
}

Expand Down

0 comments on commit a99f270

Please sign in to comment.