fix(utils): handle file write failures with rollback
All checks were successful
Auto Changelog & Release / detect-version-change (push) Successful in 3s
Auto Changelog & Release / release (push) Has been skipped
Auto Changelog & Release / changelog-only (push) Successful in 5s

- Add error handling and rollback logic for unit file writes
- Prevent partial file writes by removing created files on failure
- Update tests to reflect new return type and error handling
This commit is contained in:
2025-05-21 09:51:16 +02:00
parent a76417ce1d
commit bd71b8ee14
3 changed files with 30 additions and 8 deletions

View File

@@ -24,7 +24,7 @@ Deno.test('writeUnitFiles schreibt .service und .timer korrekt', async () => {
serviceContent,
timerContent,
options as TimerOptions,
);
) as { servicePath: string; timerPath: string };
// Überprüfe Pfade
assertEquals(servicePath, join(tmp, 'test-backup.service'));