Skip to content

Commit 34d9aac

Browse files
committed
create parent directories for config if they don't exist
1 parent 2bc1f3b commit 34d9aac

3 files changed

Lines changed: 3 additions & 2 deletions

File tree

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coman/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "coman"
3-
version = "0.5.5"
3+
version = "0.5.6"
44
edition = "2024"
55
description = "Compute Manager for managing HPC compute"
66
authors = ["Ralf Grubenmann <ralf.grubenmann@sdsc.ethz.ch>"]

coman/src/config.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ impl Layer {
159159

160160
pub fn write(&self) -> Result<()> {
161161
let contents = self.data.to_string();
162+
std::fs::create_dir_all(&self.source.parent().unwrap())?;
162163
std::fs::write(&self.source, contents).wrap_err(format!("couldn't write config {}", self.source.display()))
163164
}
164165
}

0 commit comments

Comments
 (0)