summaryrefslogtreecommitdiff
path: root/src/rebar_prv_deps_tree.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/rebar_prv_deps_tree.erl')
-rw-r--r--src/rebar_prv_deps_tree.erl14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/rebar_prv_deps_tree.erl b/src/rebar_prv_deps_tree.erl
index c0c8bab..d7b49c5 100644
--- a/src/rebar_prv_deps_tree.erl
+++ b/src/rebar_prv_deps_tree.erl
@@ -39,27 +39,23 @@ format_error(Reason) ->
%% Internal functions
print_deps_tree(SrcDeps, Verbose, State) ->
- Resources = rebar_state:resources(State),
D = lists:foldl(fun(App, Dict) ->
Name = rebar_app_info:name(App),
Vsn = rebar_app_info:original_vsn(App),
- AppDir = rebar_app_info:dir(App),
- Vsn1 = rebar_utils:vcs_vsn(Vsn, AppDir, Resources),
+ Vsn1 = rebar_utils:vcs_vsn(App, Vsn, State),
Source = rebar_app_info:source(App),
Parent = rebar_app_info:parent(App),
dict:append_list(Parent, [{Name, Vsn1, Source}], Dict)
end, dict:new(), SrcDeps),
ProjectAppNames = [{rebar_app_info:name(App)
- ,rebar_utils:vcs_vsn(rebar_app_info:original_vsn(App), rebar_app_info:dir(App), Resources)
+ ,rebar_utils:vcs_vsn(App, rebar_app_info:original_vsn(App), State)
,project} || App <- rebar_state:project_apps(State)],
- io:setopts([{encoding, unicode}]),
case dict:find(root, D) of
{ok, Children} ->
print_children("", lists:keysort(1, Children++ProjectAppNames), D, Verbose);
error ->
print_children("", lists:keysort(1, ProjectAppNames), D, Verbose)
- end,
- io:setopts([{encoding, latin1}]).
+ end.
print_children(_, [], _, _) ->
ok;
@@ -90,7 +86,7 @@ type(Source, Verbose) when is_tuple(Source) ->
{pkg, _} ->
"hex package";
{Other, false} ->
- io_lib:format("~s repo", [Other]);
+ io_lib:format("~ts repo", [Other]);
{_, true} ->
- io_lib:format("~s", [element(2, Source)])
+ io_lib:format("~ts", [element(2, Source)])
end.