fix: set operation to apply when staging update completes
TallyNote release / linux-x64 (push) Successful in 6m40s
TallyNote release / linux-x64 (push) Successful in 6m40s
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:
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "tallynote",
|
"name": "tallynote",
|
||||||
"version": "1.3.1",
|
"version": "1.3.2",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"packageManager": "pnpm@9.0.6",
|
"packageManager": "pnpm@9.0.6",
|
||||||
|
|||||||
@@ -765,7 +765,7 @@ export async function downloadAndStageUpdate(
|
|||||||
|
|
||||||
// Transition to staged
|
// Transition to staged
|
||||||
const staged = database.prepare(
|
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);
|
).run(downloaded.sha256, downloaded.size, workspace, Date.now(), jobId);
|
||||||
if (staged.changes !== 1) return; // cancelled
|
if (staged.changes !== 1) return; // cancelled
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user