fix: current version not updated in update check (#1482)

This commit is contained in:
Marvin Hagemeister
2023-07-21 13:02:16 +02:00
committed by GitHub
parent 72603d60cf
commit 3ab35a44f9
3 changed files with 43 additions and 6 deletions
+4 -1
View File
@@ -1,6 +1,6 @@
import { colors, join } from "./deps.ts";
interface CheckFile {
export interface CheckFile {
last_checked: string;
latest_version: string;
current_version: string;
@@ -88,6 +88,9 @@ export async function updateCheck(
}
}
// Update current version
checkFile.current_version = versions[0];
// Only check in the specificed interval
if (Date.now() >= new Date(checkFile.last_checked).getTime() + interval) {
try {