Symfony 4 console: Environment variable not found in prod env

Every time I run bin/console cache:clear --env=prod got an error Environment variable not found: "LOCALE" or any other variable. If a run it on the dev environment I wont see any error.

I can always run LOCALE=es_CO ./bin/console cache:clear --env=prod but I’ll get an error for the next variable.

symfony/dotenv version is v4.3.2

It seems to be working when making requests via web server.

Not sure what else should be done.

Source: Symfony Questions

Was this helpful?

0 / 0

Leave a Reply 0

Your email address will not be published. Required fields are marked *