aboutsummaryrefslogtreecommitdiffstats
path: root/src/rlx_prv_config.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/rlx_prv_config.erl')
-rw-r--r--src/rlx_prv_config.erl12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/rlx_prv_config.erl b/src/rlx_prv_config.erl
index b223bce..5f6dcad 100644
--- a/src/rlx_prv_config.erl
+++ b/src/rlx_prv_config.erl
@@ -177,7 +177,8 @@ load_terms({sys_config, SysConfig}, {ok, State}) ->
{ok, rlx_state:sys_config(State, filename:absname(SysConfig))};
load_terms({overlay_vars, OverlayVars}, {ok, State}) ->
CurrentOverlayVars = rlx_state:get(State, overlay_vars),
- NewOverlayVars = lists:umerge(lists:usort(OverlayVars), lists:usort(CurrentOverlayVars)),
+ NewOverlayVars = list_of_overlay_vars_files(OverlayVars),
+ NewOverlayVars = lists:umerge(lists:usort(NewOverlayVars), lists:usort(CurrentOverlayVars)),
{ok, rlx_state:put(State, overlay_vars, NewOverlayVars)};
load_terms({Name, Value}, {ok, State})
when erlang:is_atom(Name) ->
@@ -196,3 +197,12 @@ gen_providers(Providers, State) ->
(_, E={_, {error, _}}) ->
E
end, {[], {ok, State}}, Providers).
+
+list_of_overlay_vars_files(undefined) ->
+ [];
+list_of_overlay_vars_files([]) ->
+ [];
+list_of_overlay_vars_files([H | _]=FileNames) when erlang:is_list(H) ->
+ FileNames;
+list_of_overlay_vars_files(FileName) when is_list(FileName) ->
+ [FileName].