Skip to content

Commit

Permalink
Default to IO.write in Mix.Shell.cmd/2
Browse files Browse the repository at this point in the history
Erlang defaults to UTF-8 on Windows since Erlang/OTP 26+,
so we no longer need to check conditionally.

Closes #14253.
  • Loading branch information
josevalim committed Feb 6, 2025
1 parent a0214e9 commit 331170e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/mix/lib/mix/shell/io.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 331170e

Please # to comment.