aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJordan Wilberding <[email protected]>2013-09-16 13:20:18 -0700
committerJordan Wilberding <[email protected]>2013-09-16 13:20:18 -0700
commit13e3e74c7bc84577904515d278b7a5272c25d2e5 (patch)
tree38fb6e49d6f8c5c6d4b07d3d65d8862b417c57ae
parent47d157ee780c9c8fde1fc66ebc769ac7c10f0521 (diff)
parentcbe1be2fdd2f70e43f8bca98de6703b0f92897bc (diff)
downloadrelx-13e3e74c7bc84577904515d278b7a5272c25d2e5.tar.gz
relx-13e3e74c7bc84577904515d278b7a5272c25d2e5.tar.bz2
relx-13e3e74c7bc84577904515d278b7a5272c25d2e5.zip
Merge pull request #41 from ericbmerritt/master
fix bug in override resolution
-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}}) ->