There was an error while loading. Please reload this page.
1 parent 0fe6f68 commit 4a5fb1eCopy full SHA for 4a5fb1e
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