Skip to content

Commit

Permalink
Merge pull request #1718 from shino/bugfix/io-opts-unicode
Browse files Browse the repository at this point in the history
Set unicode option for standard_io at entry point
  • Loading branch information
ferd authored Feb 22, 2018
2 parents 94ea063 + 1effb74 commit 2560aaf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/rebar3.erl
Original file line number Diff line number Diff line change
Expand Up @@ -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 ->
Expand Down
4 changes: 1 addition & 3 deletions src/rebar_prv_deps_tree.erl
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 2560aaf

Please sign in to comment.