Skip to content

Commit 0c17fa0

Browse files
author
José Valim
committed
Use .bat executables on Windows
1 parent 752a09c commit 0c17fa0

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

lib/elixir/test/elixir/test_helper.exs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,21 @@ defmodule PathHelpers do
2323
end
2424

2525
def elixirc(args) do
26-
:os.cmd '#{elixirc_executable} #{args}'
26+
:os.cmd binary_to_list("#{elixirc_executable} #{:unicode.characters_to_binary(args)}")
2727
end
2828

2929
def elixir_executable do
30-
Path.expand("../../../../../bin/elixir", __FILE__)
30+
Path.expand("../../../../../bin/elixir#{executable_extension}", __FILE__)
3131
end
3232

3333
def elixirc_executable do
34-
elixir_executable <> "c"
34+
Path.expand("../../../../../bin/elixirc#{executable_extension}", __FILE__)
35+
end
36+
37+
if match? { :win32, _ }, :os.type do
38+
def executable_extension, do: ".bat"
39+
else
40+
def executable_extension, do: ""
3541
end
3642
end
3743

0 commit comments

Comments
 (0)