aboutsummaryrefslogtreecommitdiff
path: root/src/utils
diff options
context:
space:
mode:
authorVendicated <vendicated@riseup.net>2022-10-05 16:47:28 +0200
committerVendicated <vendicated@riseup.net>2022-10-05 16:47:28 +0200
commit443978929b04630014f16bfb127013ec7c74cb6b (patch)
tree17f6e73f69fca855764aa5426bf78f7733cdbc1f /src/utils
parent45644dec43d59607990511ed500f12e7ddaff045 (diff)
downloadVencord-443978929b04630014f16bfb127013ec7c74cb6b.tar.gz
Vencord-443978929b04630014f16bfb127013ec7c74cb6b.tar.bz2
Vencord-443978929b04630014f16bfb127013ec7c74cb6b.zip
Updater: Exclude more recent local commits
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/updater.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/utils/updater.ts b/src/utils/updater.ts
index e66a149..3b1cfa7 100644
--- a/src/utils/updater.ts
+++ b/src/utils/updater.ts
@@ -1,6 +1,7 @@
import IpcEvents from "./IpcEvents";
import Logger from "./logger";
import { IpcRes } from './types';
+import gitHash from 'git-hash';
export const UpdateLogger = new Logger("Updater", "white");
export let isOutdated = false;
@@ -18,6 +19,10 @@ async function Unwrap<T>(p: Promise<IpcRes<T>>) {
export async function checkForUpdates() {
changes = await Unwrap(VencordNative.ipc.invoke<IpcRes<typeof changes>>(IpcEvents.GET_UPDATES));
+ if (changes.some(c => c.hash === gitHash)) {
+ // git log NEWER...OLDER works as well. This means it will return the more recent local commits if the
+ changes = [];
+ }
return (isOutdated = changes.length > 0);
}