summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFred Hebert <mononcqc@ferd.ca>2015-08-25 13:17:13 +1200
committerFred Hebert <mononcqc@ferd.ca>2015-08-25 13:17:13 +1200
commit956fa2144a9d291cf19e68aa77e1e9abbc9d7530 (patch)
treec77d9221e4b920828632beb2e06908c230f8bbd4 /src
parent23201d3a1487de92ab4f6f3183f2f9e1aa5baeae (diff)
parentd67a5bce5211968527f66754c025373cab77e8ed (diff)
Merge pull request #751 from tsloughter/pkgs_prv_fix
fix pkgs provider output for new package index format
Diffstat (limited to 'src')
-rw-r--r--src/rebar_prv_packages.erl10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/rebar_prv_packages.erl b/src/rebar_prv_packages.erl
index f5d9e38..5b8ea66 100644
--- a/src/rebar_prv_packages.erl
+++ b/src/rebar_prv_packages.erl
@@ -35,8 +35,12 @@ format_error(load_registry_fail) ->
"Failed to load package regsitry. Try running 'rebar3 update' to fix".
print_packages() ->
- SortedPkgs = ets:foldl(fun({{Pkg, Vsn}, _}, Acc) ->
- orddict:append_list(Pkg, [Vsn], Acc)
+ SortedPkgs = ets:foldl(fun({package_index_version, _}, Acc) ->
+ Acc;
+ ({Pkg, Vsns}, Acc) ->
+ orddict:store(Pkg, Vsns, Acc);
+ (_, Acc) ->
+ Acc
end, orddict:new(), ?PACKAGE_TABLE),
orddict:map(fun(Name, Vsns) ->
@@ -45,7 +49,7 @@ print_packages() ->
,ec_semver:parse(B))
end, Vsns),
VsnStr = join(SortedVsns, <<", ">>),
- io:format("~s:~n Versions: ~s~n~n", [Name, VsnStr])
+ ?CONSOLE("~s:~n Versions: ~s~n", [Name, VsnStr])
end, SortedPkgs).
-spec join([binary()], binary()) -> binary().