diff --git a/src/float.ts b/src/float.ts index 63338ed..c184afe 100644 --- a/src/float.ts +++ b/src/float.ts @@ -62,17 +62,19 @@ process.on("SIGTERM", () => process.exit(143)); console.log(chalk`\n{red ///}{grey ===} {cyan Console} {grey ===}{red \\\\\\}`); } - const latest = await fApi - .got("https://raw.githubusercontent.com/Inrixia/Floatplane-Downloader/master/package.json") - .json<{ version: string }>() - .catch(() => ({ version: DownloaderVersion })); - - if (gt(latest.version, DownloaderVersion)) - console.log( - chalk`There is a ${diff(latest.version, DownloaderVersion)} update available! ${DownloaderVersion} > ${ - latest.version - }.\nHead to {cyanBright https://github.com/Inrixia/Floatplane-Downloader/releases} to update!\n`, - ); + if (args.updateCheck) { + const latest = await fApi + .got("https://raw.githubusercontent.com/Inrixia/Floatplane-Downloader/master/package.json") + .json<{ version: string }>() + .catch(() => ({ version: DownloaderVersion })); + + if (gt(latest.version, DownloaderVersion)) + console.log( + chalk`There is a ${diff(latest.version, DownloaderVersion)} update available! ${DownloaderVersion} > ${ + latest.version + }.\nHead to {cyanBright https://github.com/Inrixia/Floatplane-Downloader/releases} to update!\n`, + ); + } if (args.sanityCheck) { console.log("Sanity check passed!"); diff --git a/src/lib/defaults.ts b/src/lib/defaults.ts index bf37956..07d271f 100644 --- a/src/lib/defaults.ts +++ b/src/lib/defaults.ts @@ -31,6 +31,7 @@ export const defaultArgs: Args = { password: "", token: "", headless: false, + updateCheck: true, plexUsername: "", plexPassword: "", sanityCheck: false, diff --git a/src/lib/types.ts b/src/lib/types.ts index efc75ab..62dfa07 100644 --- a/src/lib/types.ts +++ b/src/lib/types.ts @@ -30,6 +30,7 @@ export type Args = { password: string; token: string; headless: boolean; + updateCheck: boolean; plexUsername: string; plexPassword: string; sanityCheck: boolean;