We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 91527e3 commit bca55b9Copy full SHA for bca55b9
lib/mix/lib/mix/shell/io.ex
@@ -100,12 +100,12 @@ defmodule Mix.Shell.IO do
100
"""
101
def cmd(command, opts \\ []) do
102
print_app? = Keyword.get(opts, :print_app, true)
103
+ windows? = match?({:win32, _}, :os.type())
104
105
Mix.Shell.cmd(command, opts, fn data ->
106
if print_app?, do: print_app()
- # Due to encoding of shell command on Windows,
107
- # let's write the data as is
108
- IO.binwrite(data)
+ # Due to encoding of shell command on Windows, write the data as is.
+ if windows?, do: IO.binwrite(data), else: IO.write(data)
109
end)
110
end
111
0 commit comments