Add self-update command and fix hash mismatch after pull
- kisync update: show available releases from Gitea - kisync update --apply: download and replace exe in-place - Background update check after every command (non-blocking) - Fix: compute hash from disk-read object (not server object) to prevent false "modified" status after pull due to line-ending differences Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -252,7 +252,10 @@ export async function pullCommand(force = false): Promise<void> {
|
||||
|
||||
writeEndpointToDisk(ep, endpointDir);
|
||||
|
||||
const hash = computeEndpointHash(ep);
|
||||
// Хеш считаем от того, что реально записалось на диск,
|
||||
// чтобы он совпадал при последующем readEndpointFromDisk в status
|
||||
const diskEp = readEndpointFromDisk(endpointDir);
|
||||
const hash = computeEndpointHash(diskEp || ep);
|
||||
newState.endpoints[ep.id] = {
|
||||
updated_at: ep.updated_at,
|
||||
folder_path: path.relative(root, endpointDir),
|
||||
|
||||
Reference in New Issue
Block a user