Skip to content

Commit

Permalink
fix: increase update check time
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx committed Apr 24, 2018
1 parent 2c5be20 commit 49c4b1f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/commands/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export const init: Config.Hook<'init'> = async function (opts) {
async function autoupdateNeeded(): Promise<boolean> {
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)
Expand Down

0 comments on commit 49c4b1f

Please sign in to comment.