aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEric <[email protected]>2013-09-16 13:07:06 -0700
committerEric <[email protected]>2013-09-16 13:07:06 -0700
commitcbe1be2fdd2f70e43f8bca98de6703b0f92897bc (patch)
tree38fb6e49d6f8c5c6d4b07d3d65d8862b417c57ae /src
parent47d157ee780c9c8fde1fc66ebc769ac7c10f0521 (diff)
downloadrelx-cbe1be2fdd2f70e43f8bca98de6703b0f92897bc.tar.gz
relx-cbe1be2fdd2f70e43f8bca98de6703b0f92897bc.tar.bz2
relx-cbe1be2fdd2f70e43f8bca98de6703b0f92897bc.zip
fix bug in override resolution
Diffstat (limited to 'src')
-rw-r--r--src/rlx_app_discovery.erl11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/rlx_app_discovery.erl b/src/rlx_app_discovery.erl
index d321638..033b9e7 100644
--- a/src/rlx_app_discovery.erl
+++ b/src/rlx_app_discovery.erl
@@ -88,16 +88,19 @@ setup_overrides(State, AppMetas0) ->
Overrides = rlx_state:overrides(State),
AppMetas1 = [AppMeta || AppMeta <- AppMetas0,
not lists:keymember(app_name(AppMeta), 1, Overrides)],
- [case is_valid_otp_app(filename:join([FileName, <<"ebin">>,
+ [resolve_override(AppName, FileName) || {AppName, FileName} <- Overrides] ++ AppMetas1.
+
+resolve_override(AppName, FileName0) ->
+ FileName1 = filename:absname(FileName0),
+ case is_valid_otp_app(filename:join([FileName1, <<"ebin">>,
erlang:atom_to_list(AppName) ++ ".app"])) of
{noresult, false} ->
- {error, {invalid_override, AppName, FileName}};
+ {error, {invalid_override, AppName, FileName1}};
Error = {error, _} ->
Error;
{ok, App} ->
{ok, rlx_app_info:link(App, true)}
- end || {AppName, FileName} <- Overrides] ++ AppMetas1.
-
+ end.
-spec format_detail(ErrorDetail::term()) -> iolist().
format_detail({error, {invalid_override, AppName, FileName}}) ->