Переглянути джерело

Set unicode option for starndard_io at entry point

pull/1718/head
Shunichi Shinohara 7 роки тому
джерело
коміт
1effb745a3
2 змінених файлів з 2 додано та 3 видалено
  1. +1
    -0
      src/rebar3.erl
  2. +1
    -3
      src/rebar_prv_deps_tree.erl

+ 1
- 0
src/rebar3.erl Переглянути файл

@ -116,6 +116,7 @@ run(RawArgs) ->
-spec run_aux(rebar_state:t(), [string()]) ->
{ok, rebar_state:t()} | {error, term()}.
run_aux(State, RawArgs) ->
io:setopts([{encoding, unicode}]),
%% Profile override; can only support one profile
State1 = case os:getenv("REBAR_PROFILE") of
false ->

+ 1
- 3
src/rebar_prv_deps_tree.erl Переглянути файл

@ -52,14 +52,12 @@ print_deps_tree(SrcDeps, Verbose, State) ->
ProjectAppNames = [{rebar_app_info:name(App)
,rebar_utils:vcs_vsn(rebar_app_info:original_vsn(App), rebar_app_info:dir(App), Resources)
,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;

Завантаження…
Відмінити
Зберегти