This is an automated email from the ASF dual-hosted git repository.

sbp pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tooling-trusted-release.git


The following commit(s) were added to refs/heads/main by this push:
     new 7496b74  Ensure that the hard link is removed before writing a new file
7496b74 is described below

commit 7496b7440fc79c210bb23ec194d0eb101f8fc3e1
Author: Sean B. Palmer <[email protected]>
AuthorDate: Fri Aug 29 16:12:37 2025 +0100

    Ensure that the hard link is removed before writing a new file
---
 atr/tasks/sbom.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/atr/tasks/sbom.py b/atr/tasks/sbom.py
index 52d30b8..215c75d 100644
--- a/atr/tasks/sbom.py
+++ b/atr/tasks/sbom.py
@@ -22,6 +22,7 @@ import pathlib
 from typing import Any, Final
 
 import aiofiles
+import aiofiles.os
 import yyjson
 
 import atr.archives as archives
@@ -90,6 +91,8 @@ async def augment(args: FileArgs) -> results.Results | None:
         ) as creating:
             new_full_path = os.path.join(str(creating.interim_path), 
args.file_path)
             # Write to the new revision
+            log.info(f"Writing augmented SBOM to {new_full_path}")
+            await aiofiles.os.remove(new_full_path)
             async with aiofiles.open(new_full_path, "w", encoding="utf-8") as 
f:
                 await f.write(merged.dumps())
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to