You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I spent a lot of time to understand why docker run --rm --env-file test.env myimage go test ./... use variables from .env, but docker run --rm --env-file test.env myimage env shows variables from test.env
Therefore my algorithm to load config based on loading config.yml, then rewrite by variables from the .env and then rewrite by variables from a system... But the cleanenv library rewrites system environments on reading config from .env file!!!
Be careful...
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I spent a lot of time to understand why
docker run --rm --env-file test.env myimage go test ./...
use variables from .env, butdocker run --rm --env-file test.env myimage env
shows variables from test.envTherefore my algorithm to load config based on loading config.yml, then rewrite by variables from the .env and then rewrite by variables from a system... But the cleanenv library rewrites system environments on reading config from .env file!!!
Be careful...
Beta Was this translation helpful? Give feedback.
All reactions