Skip to content

Commit 9e6b650

Browse files
author
José Valim
committed
Merge pull request #1295 from ToJans/WindowsRebarFix
Fix the rebar wrapper on windows
2 parents c56d076 + aedc785 commit 9e6b650

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/mix/lib/mix/rebar.ex

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,9 +150,10 @@ defmodule Mix.Rebar do
150150

151151
defp wrap_cmd(nil), do: nil
152152
defp wrap_cmd(rebar) do
153-
case :os.type do
154-
{ :win32, _ } -> "escript.exe #{rebar}"
155-
_ -> rebar
153+
if match?({ :win32, _ }, :os.type) and not String.ends_with?(rebar,".cmd") do
154+
"escript.exe #{rebar}"
155+
else
156+
rebar
156157
end
157158
end
158159
end

0 commit comments

Comments
 (0)