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
142142
143143 @ doc false
144144 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+
145155 case :application . get_env ( app , key ) do
146156 { :ok , % Config.Provider { } = provider } ->
147157 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
2121
2222 @ impl true
2323 def load ( config , path ) do
24- { :ok , _ } = Application . ensure_all_started ( :elixir )
2524 merge ( config , path |> Config.Provider . resolve_config_path! ( ) |> read! ( ) )
2625 end
2726
You can’t perform that action at this time.
0 commit comments