File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -142,6 +142,16 @@ defmodule Config.Provider do
142
142
143
143
@ doc false
144
144
def boot ( app , key , restart_fun \\ & System . restart / 0 ) do
145
+ # The app with the config provider settings may not
146
+ # have been loaded at this point, so make sure we load
147
+ # its environment before querying it.
148
+ _ = :application . load ( app )
149
+
150
+ # The config provider typically runs very early in the
151
+ # release process, so we need to make sure Elixir is started
152
+ # before we go around running Elixir code.
153
+ { :ok , _ } = :application . ensure_all_started ( :elixir )
154
+
145
155
case :application . get_env ( app , key ) do
146
156
{ :ok , % Config.Provider { } = provider } ->
147
157
path = resolve_config_path! ( provider . config_path )
Original file line number Diff line number Diff line change @@ -21,7 +21,6 @@ defmodule Config.Reader do
21
21
22
22
@ impl true
23
23
def load ( config , path ) do
24
- { :ok , _ } = Application . ensure_all_started ( :elixir )
25
24
merge ( config , path |> Config.Provider . resolve_config_path! ( ) |> read! ( ) )
26
25
end
27
26
You can’t perform that action at this time.
0 commit comments