Skip to content

Commit

Permalink
fix: error if directory for settings.json is not exists.
Browse files Browse the repository at this point in the history
  • Loading branch information
anatawa12 committed Jan 25, 2023
1 parent fd4b484 commit 0bf9b44
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/vpm/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,7 @@ impl Environment {
return Ok(());
}

create_dir_all(&self.global_dir).await?;
let mut file = File::create(self.global_dir.join("settings.json")).await?;
file.write_all(&to_json_vec(&self.settings)?).await?;
file.flush().await?;
Expand Down

0 comments on commit 0bf9b44

Please sign in to comment.