File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 2525-export ([start /2 , stop /1 , config_change /3 ]).
2626
2727start (_Type , _Args ) ->
28- _ = parse_otp_release (),
28+ OTP = parse_otp_release (),
2929 preload_common_modules (),
30- set_stdio_and_stderr_to_binary_and_maybe_utf8 (),
30+ set_stdio_and_stderr_to_binary_and_maybe_utf8 (OTP ),
3131 check_file_encoding (file :native_name_encoding ()),
3232
3333 case application :get_env (elixir , check_endianness , true ) of
@@ -87,7 +87,10 @@ stop(Tab) ->
8787config_change (_Changed , _New , _Remove ) ->
8888 ok .
8989
90- set_stdio_and_stderr_to_binary_and_maybe_utf8 () ->
90+ set_stdio_and_stderr_to_binary_and_maybe_utf8 (OTP ) when OTP >= 26 ->
91+ ok = io :setopts (standard_io , [binary ]),
92+ ok ;
93+ set_stdio_and_stderr_to_binary_and_maybe_utf8 (_OTP ) ->
9194 % % In case there is a shell, we can't really change its
9295 % % encoding, so we just set binary to true. Otherwise
9396 % % we must set the encoding as the user with no shell
You can’t perform that action at this time.
0 commit comments