From d67a5bce5211968527f66754c025373cab77e8ed Mon Sep 17 00:00:00 2001 From: Tristan Sloughter Date: Mon, 24 Aug 2015 09:49:52 -0500 Subject: fix pkgs provider output for new package index format --- src/rebar_prv_packages.erl | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src') 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(). -- cgit v1.1