mirror of
https://github.com/jamiepine/voicebox.git
synced 2026-10-03 09:05:17 -07:00
Treat missing/draft releases as up-to-date instead of showing error
This commit is contained in:
@@ -64,13 +64,17 @@ class TauriUpdater implements PlatformUpdater {
|
|||||||
}
|
}
|
||||||
this.notifySubscribers();
|
this.notifySubscribers();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
const message = error instanceof Error ? error.message : String(error);
|
||||||
|
// Tauri updater throws on 404 / no published release / network errors.
|
||||||
|
// Treat "no update available" style errors as up-to-date, not failures.
|
||||||
|
const isNoUpdate = /404|not found|no update|up.to.date/i.test(message);
|
||||||
this.status = {
|
this.status = {
|
||||||
checking: false,
|
checking: false,
|
||||||
available: false,
|
available: false,
|
||||||
downloading: false,
|
downloading: false,
|
||||||
installing: false,
|
installing: false,
|
||||||
readyToInstall: false,
|
readyToInstall: false,
|
||||||
error: error instanceof Error ? error.message : 'Failed to check for updates',
|
error: isNoUpdate ? undefined : message,
|
||||||
};
|
};
|
||||||
this.notifySubscribers();
|
this.notifySubscribers();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user