fix(tools): recover interrupted managed installs

Persist atomic promotion state beside each managed tool, restore usable backups after interrupted renames, and retain precise recovery failures. Verify installed executable hashes from the staged manifest record and make cleanup diagnostics unable to strand repair single-flight state.
This commit is contained in:
Sucukdeluxe
2026-08-12 01:14:17 +02:00
parent d32f42746d
commit 60b5aa8ca9
3 changed files with 400 additions and 83 deletions
+2 -1
View File
@@ -397,7 +397,8 @@ function getManagedToolInstaller(toolId: 'streamlink' | 'ffmpeg'): ManagedToolIn
if (!await extractZip(archivePath, destinationPath)) {
throw new Error('tool archive extraction failed');
}
}
},
diagnostic: (message, details) => _appendDebugLog(message, details)
});
managedToolInstallers.set(toolId, installer);
return installer;