aboutsummaryrefslogtreecommitdiffstats
path: root/src/rlx_prv_config.erl
diff options
context:
space:
mode:
authorTristan Sloughter <[email protected]>2014-05-04 11:55:11 -0500
committerTristan Sloughter <[email protected]>2014-05-04 11:55:11 -0500
commitbb076f9f4077fb2286caa8271598bfbff0a9b3d4 (patch)
treeabab9bdd87b9c239dc37b345b50eb02381bf2b6c /src/rlx_prv_config.erl
parent5d61e6750560c42671065ed5092718c84e4c5f14 (diff)
downloadrelx-bb076f9f4077fb2286caa8271598bfbff0a9b3d4.tar.gz
relx-bb076f9f4077fb2286caa8271598bfbff0a9b3d4.tar.bz2
relx-bb076f9f4077fb2286caa8271598bfbff0a9b3d4.zip
don't override release set in cmd args
Diffstat (limited to 'src/rlx_prv_config.erl')
-rw-r--r--src/rlx_prv_config.erl7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/rlx_prv_config.erl b/src/rlx_prv_config.erl
index da620be..7c2ace0 100644
--- a/src/rlx_prv_config.erl
+++ b/src/rlx_prv_config.erl
@@ -122,7 +122,12 @@ load_config(ConfigFile, State) ->
-spec load_terms(term(), {ok, rlx_state:t()} | relx:error()) ->
{ok, rlx_state:t()} | relx:error().
load_terms({default_release, RelName, RelVsn}, {ok, State}) ->
- {ok, rlx_state:default_configured_release(State, RelName, RelVsn)};
+ case rlx_state:default_configured_release(State) of
+ {undefined, undefined} ->
+ {ok, rlx_state:default_configured_release(State, RelName, RelVsn)};
+ _ ->
+ {ok, State}
+ end;
load_terms({paths, Paths}, {ok, State}) ->
code:add_pathsa([filename:absname(Path) || Path <- Paths]),
{ok, State};