mirror of
https://github.com/Corfirean/coa-server-manager.git
synced 2026-11-21 03:25:56 +00:00
Make the update check survive damaged launcher state and an unavailable database
A crash during a launcher write can leave .state/*.json zero-filled, which made every launcher start (and so the update check) fail with "Something went wrong". Zero-filled state files are now discarded before each launcher verb, the check degrades to a warning when the database cannot be inspected, and database start failures carry the launcher's own output. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
fac6ce469a
commit
c6e8a34509
13 files changed
+80
-4
No files matched your search
@@ -3,5 +3,5 @@ import type { UpdatePreview } from "./api";
|
||||
export function isUpdateCurrent(preview: UpdatePreview): boolean {
|
||||
return preview.from_version === preview.to_version
|
||||
&& preview.items.every((item) => item.action === "skip")
|
||||
&& (preview.pending_migrations ?? (preview.migrations === 0 ? 0 : undefined)) === 0;
|
||||
&& (preview.database_check_error !== undefined || (preview.pending_migrations ?? (preview.migrations === 0 ? 0 : undefined)) === 0);
|
||||
}
|
||||
Reference in new issue
Block a user