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

Env fix #368

Merged
merged 9 commits into from
Jun 11, 2021
Merged

Env fix #368

merged 9 commits into from
Jun 11, 2021

Conversation

Mikearaya
Copy link
Contributor

Things adjusted

  • provide .env.schema path to dotenv-extended load parameter because it was not picking it up.
  • provide errorOnMissing: false instead of process.env.SUPPRESS_ENV_ERRORS is not being read and it throws an error for missing config values or requests to put default values for each property in .env.schema
  • add UNCHAINED_ prefix for COUNTRY, LANG, and CURRENCY env values because I noticed lang value in env file was getting overwritten by os value and that is not intended.

@Mikearaya Mikearaya marked this pull request as ready for review May 29, 2021 20:13
@Mikearaya Mikearaya requested a review from pozylon May 29, 2021 20:14
@pozylon
Copy link
Member

pozylon commented Jun 4, 2021

@Mikearaya

.env-schema was not thought to be loaded by dotenv-extended as it's part of the root and should show all possible env's used while testing, running controlpanel and engine.

I actually don't want to deactivate errorOnMissing because that's one of the most important features of dotenv-extended. What if we just remove it and build two new .env.schema in examples/minimal and examples/controlpanel? To suppress missing env error just set a default value with .env.defaults where possible.

Copy link
Member

@pozylon pozylon left a comment

Choose a reason for hiding this comment

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

See comment in conv

@Mikearaya
Copy link
Contributor Author

yes, that would get both things done

@Mikearaya
Copy link
Contributor Author

the control panel only has .env.schema definitions that are relevant to it. all the rest are in minimal because that's where they are used

@Mikearaya Mikearaya linked an issue Jun 7, 2021 that may be closed by this pull request
examples/controlpanel/next.config.js Outdated Show resolved Hide resolved
examples/controlpanel/package.json Outdated Show resolved Hide resolved
changelog.md Show resolved Hide resolved
Copy link
Member

@pozylon pozylon left a comment

Choose a reason for hiding this comment

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

All nice and clean despite the suppress thing, after you can merge

examples/minimal/node_env.js Outdated Show resolved Hide resolved
@Mikearaya
Copy link
Contributor Author

damn, forgot after test 😦

@pozylon pozylon merged commit 7013376 into master Jun 11, 2021
@pozylon pozylon deleted the env-fix branch June 11, 2021 12:20
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.

catalogPrices are null for Czech users (and maybe others)
2 participants