Skip to content

Commit c0bff9a

Browse files
committed
Updates: Allow updater to work and restart app
Plus add logging
1 parent c92dff8 commit c0bff9a

2 files changed

Lines changed: 15 additions & 1 deletion

File tree

apps/desktop/src-tauri/capabilities/default.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
"mcp-bridge:default",
2626
"drag:default",
2727
"fs:allow-temp-write",
28-
"fs:allow-remove"
28+
"fs:allow-remove",
29+
"updater:default",
30+
"process:allow-restart"
2931
]
3032
}

apps/desktop/src/lib/updater.svelte.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ export function getUpdateState(): UpdateState {
2020
}
2121

2222
export async function checkForUpdates(): Promise<void> {
23+
// eslint-disable-next-line no-console
24+
console.log('[updater] checkForUpdates called, current status:', updateState.status)
25+
2326
if (updateState.status === 'downloading' || updateState.status === 'ready') {
2427
return // Don't interrupt ongoing download or ready state
2528
}
@@ -28,7 +31,11 @@ export async function checkForUpdates(): Promise<void> {
2831
updateState.error = null
2932

3033
try {
34+
// eslint-disable-next-line no-console
35+
console.log('[updater] Checking for updates...')
3136
const update = await check()
37+
// eslint-disable-next-line no-console
38+
console.log('[updater] Check result:', update)
3239

3340
if (update !== null) {
3441
updateState.status = 'downloading'
@@ -51,8 +58,13 @@ export async function restartToUpdate(): Promise<void> {
5158
}
5259

5360
export function startUpdateChecker(): () => void {
61+
// eslint-disable-next-line no-console
62+
console.log('[updater] startUpdateChecker called, DEV mode:', import.meta.env.DEV)
63+
5464
// Skip update checks in dev mode to avoid hitting real endpoint
5565
if (import.meta.env.DEV) {
66+
// eslint-disable-next-line no-console
67+
console.log('[updater] Skipping update check in dev mode')
5668
return () => {}
5769
}
5870

0 commit comments

Comments
 (0)