fix: set operation to apply when staging update completes

downloadAndStageUpdate set status=staged but left operation=download,
causing the root runner CLI to reject the apply (operation check failed)
and silently skip the version switch. The symlink stayed on the old version
while the runner reported SUCCESS.
release: 1.3.2
This commit is contained in:
Qiufeng
2026-09-11 08:11:27 +08:00
parent c55ce25939
commit 90e1c88012
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "tallynote",
"version": "1.3.1",
"version": "1.3.2",
"private": true,
"type": "module",
"packageManager": "pnpm@9.0.6",
+1 -1
View File
@@ -765,7 +765,7 @@ export async function downloadAndStageUpdate(
// Transition to staged
const staged = database.prepare(
"UPDATE update_jobs SET status='staged', actual_sha256=?, size_bytes=?, download_path=?, updated_at=? WHERE id=? AND status IN ('verifying', 'downloading')",
"UPDATE update_jobs SET status='staged', operation='apply', actual_sha256=?, size_bytes=?, download_path=?, updated_at=? WHERE id=? AND status IN ('verifying', 'downloading')",
).run(downloaded.sha256, downloaded.size, workspace, Date.now(), jobId);
if (staged.changes !== 1) return; // cancelled