Skip to content

Commit

Permalink
fix: correct env var check
Browse files Browse the repository at this point in the history
  • Loading branch information
adrians5j committed Nov 15, 2023
1 parent 51109c3 commit 7ba2a74
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/cli/utils/loadEnvVariables.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ if (project.config.featureFlags) {
// With 5.38.0, we are hiding the `WEBINY_ELASTICSEARCH_INDEX_LOCALE` env variable and always setting it to `true`.
// This is because this variable is not something users should be concerned with, nor should they be able to change it.
// In order to ensure backwards compatibility, we first check if the variable is set, and if it is, we don't override it.
if (!"WEBINY_ELASTICSEARCH_INDEX_LOCALE" in process.env) {
const esIndexLocaleEnvVarExists = "WEBINY_ELASTICSEARCH_INDEX_LOCALE" in process.env;
if (!esIndexLocaleEnvVarExists) {
process.env.WEBINY_ELASTICSEARCH_INDEX_LOCALE = "true";
}

0 comments on commit 7ba2a74

Please sign in to comment.