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

[legacy-framework] Fix APP_ENV loading to not load all .env files #3026

Merged
merged 3 commits into from
Dec 6, 2021

Conversation

JuanM04
Copy link

@JuanM04 JuanM04 commented Dec 5, 2021

What are the changes and their implications?

Changes the behavior of blitz --env. Right now, if I run blitz start --env staging it will load both .env.production* and .env.staging*.

With these changes, only the env files declared with --env will be loaded. Also, now you can pass multiple environments:

blitz start
# .env.production.local
# .env.production
# .env.local
# .env

blitz start --env staging
# .env.staging.local
# .env.staging
# .env.local
# .env

blitz start --env staging,production
# .env.staging.local
# .env.staging
# .env.production.local
# .env.production
# .env.local
# .env

Feature Checklist

@flybayer
Copy link
Member

flybayer commented Dec 6, 2021

Ah oops, thank you!

You do have one failing integration test, "test/integration/env-config-app-env/" under CI integration 7 https://github.com/blitz-js/blitz/runs/4422960457?check_suite_focus=true. The other failures are CI flake

@flybayer flybayer changed the title Changed APP_ENV load behavior Fix APP_ENV loading to not load all .env files Dec 6, 2021
@flybayer flybayer merged commit abeb0c5 into canary Dec 6, 2021
@flybayer flybayer deleted the fix-default-app-envs branch December 6, 2021 18:02
JuanM04 added a commit to blitz-js/blitzjs.com that referenced this pull request Dec 6, 2021
beerose pushed a commit to blitz-js/blitzjs.com that referenced this pull request Dec 8, 2021
@itsdillon itsdillon changed the title Fix APP_ENV loading to not load all .env files [legacy-framework] Fix APP_ENV loading to not load all .env files Jul 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants