From 331170edaff812f7eac5c54ac86e8e8ef50756a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Thu, 6 Feb 2025 12:05:15 +0100 Subject: [PATCH] Default to IO.write in Mix.Shell.cmd/2 Erlang defaults to UTF-8 on Windows since Erlang/OTP 26+, so we no longer need to check conditionally. Closes #14253. --- lib/mix/lib/mix/shell/io.ex | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/mix/lib/mix/shell/io.ex b/lib/mix/lib/mix/shell/io.ex index ca558030a66..8255d53adfa 100644 --- a/lib/mix/lib/mix/shell/io.ex +++ b/lib/mix/lib/mix/shell/io.ex @@ -104,8 +104,7 @@ defmodule Mix.Shell.IO do Mix.Shell.cmd(command, opts, fn data -> if print_app?, do: print_app() - # Due to encoding of shell command on Windows, write the data as is. - if windows?, do: IO.binwrite(data), else: IO.write(data) + IO.write(data) end) end end