From 49c4b1f6009571b9513caabd3e52b229c3e261c9 Mon Sep 17 00:00:00 2001 From: Jeff Dickey <216188+jdxcode@users.noreply.github.com> Date: Mon, 23 Apr 2018 20:19:05 -0700 Subject: [PATCH] fix: increase update check time --- src/commands/update.ts | 2 +- src/hooks/init.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/commands/update.ts b/src/commands/update.ts index 5ecea276..bada81f4 100644 --- a/src/commands/update.ts +++ b/src/commands/update.ts @@ -153,7 +153,7 @@ export default class UpdateCommand extends Command { let promises = files.map(async f => { if (['bin', this.config.version].includes(path.basename(f.path))) return const mtime = f.stat.mtime - mtime.setHours(mtime.getHours() + 7 * 24) + mtime.setHours(mtime.getHours() + 14 * 24) if (mtime < new Date()) { await fs.remove(f.path) } diff --git a/src/hooks/init.ts b/src/hooks/init.ts index 7e04fbfa..809d1452 100644 --- a/src/hooks/init.ts +++ b/src/hooks/init.ts @@ -35,7 +35,7 @@ export const init: Config.Hook<'init'> = async function (opts) { async function autoupdateNeeded(): Promise { try { const m = await mtime(autoupdatefile) - m.setHours(m.getHours() + 5) + m.setHours(m.getHours() + 24 * 7) return m < new Date() } catch (err) { if (err.code !== 'ENOENT') cli.error(err.stack)