summary refs log tree commit diff
path: root/src/util/util/AutoUpdate.ts
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/util/util/AutoUpdate.ts9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/util/util/AutoUpdate.ts b/src/util/util/AutoUpdate.ts

index 2af5cf1c..39173d94 100644 --- a/src/util/util/AutoUpdate.ts +++ b/src/util/util/AutoUpdate.ts
@@ -37,17 +37,14 @@ export function enableAutoUpdate(opts: { }) { if (!opts.checkInterval) return; const interval = 1000 * 60 * 60 * 24; - if (typeof opts.checkInterval === "number") - opts.checkInterval = 1000 * interval; + if (typeof opts.checkInterval === "number") opts.checkInterval = 1000 * interval; const i = setInterval(async () => { const currentVersion = await getCurrentVersion(opts.path); const latestVersion = await getLatestVersion(opts.packageJsonLink); if (currentVersion !== latestVersion) { clearInterval(i); - console.log( - `[Auto Update] Current version (${currentVersion}) is out of date, updating ...`, - ); + console.log(`[Auto Update] Current version (${currentVersion}) is out of date, updating ...`); await download(opts.downloadUrl, opts.path); } }, interval); @@ -64,7 +61,7 @@ export function enableAutoUpdate(opts: { } else { console.log(`[Auto update] aborted`); } - }, + } ); } });