-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Closed
Labels
Description
Environment
$ elixir --version
Erlang/OTP 21 [erts-10.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [hipe]
Elixir 1.8.0 (compiled with Erlang/OTP 20)
- Operating system: Ubuntu 18.04
Current behavior
When I put, e.g.:
config :my_app, MyApp.Endpoint,
http: [port: 7435]
into a some_config.exs
file and then mix run --config some_config.exs
, I'll get:
IO.inspect Application.get_env(:my_app, MyApp.Endpoint)
# [http: [port: 7435]]
despite having entries in the "default" config files loaded in a rather standard manner (i.e. config/config.exs
doing import_config config/dev.exs
etc.).
Expected behavior
I'd expect the config from some_config.exs
be deeply merged as are the config/config.exs
and config/dev.exs
loaded by default.
That is, if without the override in --config some_config.exs
I have:
IO.inspect Application.get_env(:my_app, MyApp.Endpoint)
# [
# secret_key_base: ...
# <snip>,
# http: [port: 7434],
# <snip>
# ]
with the override --config some_config.exs
, I'd expect to have
# [
# secret_key_base: ...
# <snip>,
# http: [port: 7435],
# <snip>
# ]
which would effectively be config/config.exs
with config/dev.exs
merged in with some_config.exs
merged in, deeply