fix(utils): handle file write failures with rollback
- 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:
@@ -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'));
|
||||
|
Reference in New Issue
Block a user