aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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};