Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add check for FORCE_VERSION_CACHE_UPDATE env variable #357

Merged
merged 2 commits into from
Feb 28, 2023

Conversation

k80bowman
Copy link
Contributor

Adds a check for a FORCE_VERSION_CACHE_UPDATE environment variable in order to force a cache refresh.

Would allow for a solution to a bug on the Heroku CLI.

@k80bowman k80bowman requested a review from mdonnalley February 28, 2023 17:15
@@ -44,6 +44,7 @@ const hook: Hook<'init'> = async function ({config}) {
}

const refreshNeeded = async () => {
if (process.env.FORCE_VERSION_CACHE_UPDATE) return true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you make this a scoped env var, by doing this?

if (this.config.scopedEnvVarTrue('FORCE_VERSION_CACHE_UPDATE')) return true

this.config has a few scopedEnvVar methods that append the cli's name to the env var. So for heroku it would be HEROKU_FORCE_VERSION_CACHE_UPDATE and for sf it would be SF_FORCE_VERSION_CACHE_UPDATE

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure thing! Thanks.

@mdonnalley mdonnalley merged commit ace4bcd into main Feb 28, 2023
@mdonnalley mdonnalley deleted the k80/force-cache-update branch February 28, 2023 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants