summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/rebar_paths.erl7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/rebar_paths.erl b/src/rebar_paths.erl
index 82c0218..c49ed36 100644
--- a/src/rebar_paths.erl
+++ b/src/rebar_paths.erl
@@ -111,7 +111,6 @@ purge_and_load([{_Group, Apps}|Rest], Seen) ->
%% Shouldn't unload ourselves; rebar runs without ever
%% being started and unloading breaks logging!
AppName =/= <<"rebar">>],
-
%% 4)
CandidateMods = lists:append(
%% Start by asking the currently loaded app (if loaded)
@@ -121,8 +120,10 @@ purge_and_load([{_Group, Apps}|Rest], Seen) ->
Mods;
undefined ->
%% if not found, parse the app file on disk, in case
- %% the app's modules are used without it being loaded
- case rebar_app_info:app_details(App) of
+ %% the app's modules are used without it being loaded;
+ %% invalidate the cache in case we're proceeding during
+ %% compilation steps by setting the app details to `[]'
+ case rebar_app_info:app_details(rebar_app_info:app_details(App, [])) of
[] -> [];
Details -> proplists:get_value(modules, Details, [])
end