summaryrefslogtreecommitdiff
path: root/src/rebar_hex_repos.erl
diff options
context:
space:
mode:
authorTristan Sloughter <t@crashfast.com>2019-01-13 12:38:28 -0800
committerGitHub <noreply@github.com>2019-01-13 12:38:28 -0800
commitc934ccca297748ad114667a682904af774899a94 (patch)
treebad8e4c13ba3ad01b7b5919209d3214092457306 /src/rebar_hex_repos.erl
parentcd8493f6cda1628108a58c578d9f100910b814d4 (diff)
add repo_name to repoconfig used with hex_core to be compatible (#1996)
Diffstat (limited to 'src/rebar_hex_repos.erl')
-rw-r--r--src/rebar_hex_repos.erl5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/rebar_hex_repos.erl b/src/rebar_hex_repos.erl
index 57b5bc8..def5f49 100644
--- a/src/rebar_hex_repos.erl
+++ b/src/rebar_hex_repos.erl
@@ -68,17 +68,20 @@ repos(HexConfig) ->
merge_repos(RepoList ++ [HexDefaultConfig])
end.
+%% merge repos must add a field repo_name to work with hex_core 0.4.0
-spec merge_repos([repo()]) -> [repo()].
merge_repos(Repos) ->
lists:foldl(fun(R=#{name := Name}, ReposAcc) ->
%% private organizations include the parent repo before a :
case rebar_string:split(Name, <<":">>) of
[Repo, Org] ->
+ %% hex_core uses repo_name for parent
update_repo_list(R#{name => Name,
+ repo_name => Repo,
organization => Org,
parent => Repo}, ReposAcc);
_ ->
- update_repo_list(R, ReposAcc)
+ update_repo_list(R#{repo_name => Name}, ReposAcc)
end
end, [], Repos).