Parcourir la source

use ~ts for unicode output and reset encoding to latin1

pull/767/head
Tristan Sloughter il y a 9 ans
Parent
révision
a1d45c364c
1 fichiers modifiés avec 5 ajouts et 4 suppressions
  1. +5
    -4
      src/rebar_prv_deps_tree.erl

+ 5
- 4
src/rebar_prv_deps_tree.erl Voir le fichier

@ -55,20 +55,21 @@ print_deps_tree(SrcDeps, Verbose, State) ->
print_children("", lists:keysort(1, Children++ProjectAppNames), D, Verbose); print_children("", lists:keysort(1, Children++ProjectAppNames), D, Verbose);
error -> error ->
print_children("", lists:keysort(1, ProjectAppNames), D, Verbose) print_children("", lists:keysort(1, ProjectAppNames), D, Verbose)
end.
end,
io:setopts([{encoding, latin1}]).
print_children(_, [], _, _) -> print_children(_, [], _, _) ->
ok; ok;
print_children(Prefix, [{Name, Vsn, Source} | Rest], Dict, Verbose) -> print_children(Prefix, [{Name, Vsn, Source} | Rest], Dict, Verbose) ->
Prefix1 = case Rest of Prefix1 = case Rest of
[] -> [] ->
io:format(" ~s└─ ", [Prefix]),
io:format("~ts└─ ", [Prefix]),
[Prefix, " "]; [Prefix, " "];
_ -> _ ->
io:format(" ~s├─ ", [Prefix]),
io:format("~ts├─ ", [Prefix]),
[Prefix, ""] [Prefix, ""]
end, end,
io:format(" ~s ~s ( ~s)~n", [Name, Vsn, type(Source, Verbose)]),
io:format("~ts~ts (~ts)~n", [Name, Vsn, type(Source, Verbose)]),
case dict:find(Name, Dict) of case dict:find(Name, Dict) of
{ok, Children} -> {ok, Children} ->
print_children(Prefix1, lists:keysort(1, Children), Dict, Verbose), print_children(Prefix1, lists:keysort(1, Children), Dict, Verbose),

Chargement…
Annuler
Enregistrer