aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2015-05-23 13:12:03 +0300
committerLoïc Hoguin <[email protected]>2015-05-23 13:12:03 +0300
commitadf3e29b32ab7e41e8fb77ba3bdc34876fb34ae0 (patch)
tree43b7fb75aef238a03c9e0451614580c6e7acca44
parent5c110f85e1cfcf3bbbf03128341292b2b7db464b (diff)
downloaderlang.mk-adf3e29b32ab7e41e8fb77ba3bdc34876fb34ae0.tar.gz
erlang.mk-adf3e29b32ab7e41e8fb77ba3bdc34876fb34ae0.tar.bz2
erlang.mk-adf3e29b32ab7e41e8fb77ba3bdc34876fb34ae0.zip
Always ignore the modules list in original .app/.app.src file
Some packages have invalid lists.
-rw-r--r--core/deps.mk2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/deps.mk b/core/deps.mk
index 228bef5..368bc2a 100644
--- a/core/deps.mk
+++ b/core/deps.mk
@@ -378,7 +378,7 @@ define dep_autopatch_appsrc.erl
true ->
fun() ->
{ok, [{application, $(1), L}]} = file:consult(AppSrcIn),
- L2 = case lists:keyfind(modules, 1, L) of {_, _} -> L; false -> [{modules, []}|L] end,
+ L2 = lists:keystore(modules, 1, L, {modules, []}),
L3 = case lists:keyfind(vsn, 1, L2) of {vsn, git} -> lists:keyreplace(vsn, 1, L2, {vsn, "git"}); _ -> L2 end,
ok = file:write_file(AppSrcOut, io_lib:format("~p.~n", [{application, $(1), L3}]))
end(),