diff --git a/Cargo.lock b/Cargo.lock index c1e2264..55efd28 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -37,9 +37,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.80" +version = "1.0.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ad32ce52e4161730f7098c077cd2ed6229b5804ccf99e5366be1ab72a98b4e1" +checksum = "0952808a6c2afd1aa8947271f3a60f1a6763c7b912d210184c5149b5cf147247" [[package]] name = "atty" diff --git a/Cargo.toml b/Cargo.toml index 73de4c2..11b50d5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,7 +26,7 @@ simplelog = "0.12" nix = { version = "0.28", default-features = false, features = ["user"] } shlex = "1.3" sha2 = "0.10.8" -anyhow = "1.0.80" +anyhow = "1.0.81" thiserror = "1.0.58" tera = "1" serde_json = "1.0.114" diff --git a/src/environment.rs b/src/environment.rs index 1ea2250..5546227 100644 --- a/src/environment.rs +++ b/src/environment.rs @@ -135,7 +135,11 @@ mod test { path.parent() .ok_or_else(|| anyhow!("Unable to take parent of path"))?, )?; - fs::OpenOptions::new().create(true).write(true).open(path)?; + fs::OpenOptions::new() + .truncate(false) + .create(true) + .write(true) + .open(path)?; Ok(()) }