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.
2 parents f2addbb + 4c7ee1e commit a24b9c4Copy full SHA for a24b9c4
lib/mix/lib/mix/shell.ex
@@ -56,14 +56,15 @@ defmodule Mix.Shell do
56
# Finding shell command logic from :os.cmd in OTP
57
# https://github.com/erlang/otp/blob/8deb96fb1d017307e22d2ab88968b9ef9f1b71d0/lib/kernel/src/os.erl#L184
58
defp shell_command(command) do
59
- command = command
60
- |> String.replace("\"", "\\\"")
61
- |> to_char_list
62
-
63
case :os.type do
64
{ :unix, _ } ->
+ command = command
+ |> String.replace("\"", "\\\"")
+ |> to_char_list
65
%c(sh -c "#{command}")
+
66
{ :win32, osname } ->
67
+ command = to_char_list(command)
68
case { System.get_env("COMSPEC"), osname } do
69
{ nil, :windows } -> 'command.com /c #{command}'
70
{ nil, _ } -> 'cmd /c #{command}'
0 commit comments