Skip to content

Commit 296162a

Browse files
authored
Merge pull request #2794 from josevalim/patch-1
2 parents 26d3189 + 5eaf1b6 commit 296162a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Diff for: apps/rebar/src/rebar3.erl

+7-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,13 @@ run(RawArgs) ->
117117
-spec run_aux(rebar_state:t(), [string()]) ->
118118
{ok, rebar_state:t()} | {error, term()}.
119119
run_aux(State, RawArgs) ->
120-
io:setopts([{encoding, unicode}]),
120+
%% The shell is already set to Unicode from Erlang/OTP 26+.
121+
%% Skipping this also avoids a regression on Erlang/OTP 26.0.0.
122+
case code:ensure_loaded(prim_tty) of
123+
{module, _} -> ok;
124+
{error, _} -> io:setopts([{encoding, unicode}])
125+
end,
126+
121127
%% Profile override; can only support one profile
122128
State1 = case os:getenv("REBAR_PROFILE") of
123129
false ->

0 commit comments

Comments
 (0)