diff options
author | Tristan Sloughter <t@crashfast.com> | 2015-08-24 09:49:52 -0500 |
---|---|---|
committer | Tristan Sloughter <t@crashfast.com> | 2015-08-24 14:22:14 -0500 |
commit | d67a5bce5211968527f66754c025373cab77e8ed (patch) | |
tree | f2e7d465bd068c6784aaafe06c093276850c073d /src | |
parent | 807daff78b9d648e42c482033504af880699bd58 (diff) |
fix pkgs provider output for new package index format
Diffstat (limited to 'src')
-rw-r--r-- | src/rebar_prv_packages.erl | 10 |
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(). |