소스 검색

Merge pull request #767 from tsloughter/tree_unicode

use ~ts for unicode output and reset encoding to latin1
pull/680/merge
Fred Hebert 9 년 전
부모
커밋
0775af04e7
1개의 변경된 파일5개의 추가작업 그리고 4개의 파일을 삭제
  1. +5
    -4
      src/rebar_prv_deps_tree.erl

+ 5
- 4
src/rebar_prv_deps_tree.erl 파일 보기

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

불러오는 중...
취소
저장