summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorShunichi Shinohara <shino@shiguredo.jp>2018-02-22 09:22:07 +0900
committerShunichi Shinohara <shino@shiguredo.jp>2018-02-22 09:24:31 +0900
commit1effb745a38ed0f3d001b24393bf8dc177033af2 (patch)
treea31292d5d06cae767934a2785053b3121eddd989 /src
parentea79c6ad8815f6b74fc673668ba5f63f8763b2e0 (diff)
Set unicode option for starndard_io at entry point
Diffstat (limited to 'src')
-rw-r--r--src/rebar3.erl1
-rw-r--r--src/rebar_prv_deps_tree.erl4
2 files changed, 2 insertions, 3 deletions
diff --git a/src/rebar3.erl b/src/rebar3.erl
index 2b24bca..80b4e4d 100644
--- a/src/rebar3.erl
+++ b/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 ->
diff --git a/src/rebar_prv_deps_tree.erl b/src/rebar_prv_deps_tree.erl
index 7c6978b..07c7972 100644
--- a/src/rebar_prv_deps_tree.erl
+++ b/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;