From c7dc1a0173a14e9cb52adcb09ae566cf7eeb314a Mon Sep 17 00:00:00 2001 From: Hermes Agent Date: Wed, 12 Aug 2026 06:02:57 +0000 Subject: Protect companion manifests from overwrite --- src/build.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/build.rs') diff --git a/src/build.rs b/src/build.rs index 42c57ef..fcacfc0 100644 --- a/src/build.rs +++ b/src/build.rs @@ -42,6 +42,10 @@ impl BuildExecutor { if artifact.exists() { bail!("output artifact already exists; refusing to overwrite it: {}", artifact.display()); } + let manifest = ArtifactManifest::path_beside(artifact)?; + if manifest.exists() { + bail!("output manifest already exists; refusing to overwrite it: {}", manifest.display()); + } let parent = artifact .parent() .filter(|parent| !parent.as_os_str().is_empty()) -- cgit v1.2.3