aboutsummaryrefslogtreecommitdiffstats
path: root/src/rlx_config.erl
diff options
context:
space:
mode:
authorAndrás Boroska <[email protected]>2018-12-31 11:20:55 +0100
committerAndrás Boroska <[email protected]>2018-12-31 16:24:34 +0100
commit64871e4cb37b2f52c0956b81bbdf1e500977fd01 (patch)
tree9ccadc0a4d084bd3b696330e676cc774e1395605 /src/rlx_config.erl
parent9f9989167b04c1335c23fafe9945f490abbff799 (diff)
downloadrelx-64871e4cb37b2f52c0956b81bbdf1e500977fd01.tar.gz
relx-64871e4cb37b2f52c0956b81bbdf1e500977fd01.tar.bz2
relx-64871e4cb37b2f52c0956b81bbdf1e500977fd01.zip
fix handling of default_release in config
When no release specified in cli, prevent overwriting default_release in relx config.
Diffstat (limited to 'src/rlx_config.erl')
-rw-r--r--src/rlx_config.erl3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/rlx_config.erl b/src/rlx_config.erl
index b341ae7..4160bba 100644
--- a/src/rlx_config.erl
+++ b/src/rlx_config.erl
@@ -339,6 +339,9 @@ merge_configs([{Key, Value} | CliTerms], ConfigTerms) ->
false ->
merge_configs(CliTerms, ConfigTerms++[{Key, Value}])
end;
+ default_release when Value =:= {undefined, undefined} ->
+ %% No release specified in cli. Prevent overwriting default_release in ConfigTerms.
+ merge_configs(CliTerms, lists:keymerge(1, ConfigTerms, [{Key, Value}]));
_ ->
merge_configs(CliTerms, lists:reverse(lists:keystore(Key, 1, lists:reverse(ConfigTerms), {Key, Value})))
end.