From aa3bbb09ce588338e2797940b8a64a4318efe4c9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 26 Mar 2024 11:36:59 +0000 Subject: [PATCH 1/2] Bump anyhow from 1.0.80 to 1.0.81 Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.80 to 1.0.81. - [Release notes](https://github.com/dtolnay/anyhow/releases) - [Commits](https://github.com/dtolnay/anyhow/compare/1.0.80...1.0.81) --- updated-dependencies: - dependency-name: anyhow dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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" From 8308813cfc66f96d3ffa2da73b49617712b82521 Mon Sep 17 00:00:00 2001 From: Max Dymond Date: Tue, 26 Mar 2024 11:57:02 +0000 Subject: [PATCH 2/2] Ensure clear options when touching file Signed-off-by: Max Dymond --- src/environment.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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(()) }