Skip to content

Commit

Permalink
fix: add check for FORCE_VERSION_CACHE_UPDATE env variable (#357)
Browse files Browse the repository at this point in the history
* fix: add check for FORCE_VERSION_CACHE_UPDATE env variable

* fix: add scope to new cache update env variable
  • Loading branch information
k80bowman authored Feb 28, 2023
1 parent fc90d95 commit ace4bcd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/hooks/init/check-update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ const hook: Hook<'init'> = async function ({config}) {
}

const refreshNeeded = async () => {
if (this.config.scopedEnvVarTrue('FORCE_VERSION_CACHE_UPDATE')) return true
try {
const {mtime} = await fs.stat(file)
const staleAt = new Date(mtime.valueOf() + (1000 * 60 * 60 * 24 * timeoutInDays))
Expand Down

0 comments on commit ace4bcd

Please sign in to comment.