Skip to content

Commit

Permalink
fix: remove version check
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx committed Apr 25, 2018
1 parent 63799c0 commit 12b5f79
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/hooks/init/check_update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@ const hook: Hook<'init'> = async function ({config}) {
const timeoutInDays = cfg.timeoutInDays || 60
const {mtime} = await fs.stat(file)
const staleAt = new Date(mtime.valueOf() + 1000 * 60 * 60 * 24 * timeoutInDays)
if (staleAt < new Date()) return true
const versions = await fs.readJSON(file)
return !versions.current || versions.current !== config.version
return staleAt < new Date()
} catch (err) {
debug(err)
return true
Expand Down

0 comments on commit 12b5f79

Please sign in to comment.