Skip to content

Commit 7f5fe54

Browse files
committed
Handle non-UTF-8 encoding on Windows
Closes elixir-lang/elixir#13637
1 parent 4ce33b5 commit 7f5fe54

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/elixir_make/compiler.ex

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,9 @@ defmodule ElixirMake.Compiler do
102102
# as soon as `exec` prints them (using `IO.Stream`).
103103
defp cmd(exec, args, cwd, env, verbose?) do
104104
opts = [
105-
into: IO.stream(:stdio, :line),
105+
# There is no guarantee the command will return valid UTF-8,
106+
# especially on Windows, so don't try to interpret the stream
107+
into: IO.binstream(:stdio, :line),
106108
stderr_to_stdout: true,
107109
cd: cwd,
108110
env: env

0 commit comments

Comments
 (0)