Skip to content

Commit e7a872c

Browse files
committed
Mix.Shell: Fix incorrect Windows' COMSPEC handling
1 parent 453d883 commit e7a872c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/mix/lib/mix/shell.ex

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,10 @@ defmodule Mix.Shell do
6262
{ :unix, _ } ->
6363
%c(sh -c '#{command}')
6464
{ :win32, osname } ->
65-
case { System.getenv("COMSPEC"), osname } do
66-
{ false, :windows } -> 'command.com /c #{command}'
67-
{ false, _ } -> 'cmd /c #{command}'
68-
{ false, cmd } -> '#{cmd} /c #{command}'
65+
case { System.get_env("COMSPEC"), osname } do
66+
{ nil, :windows } -> 'command.com /c #{command}'
67+
{ nil, _ } -> 'cmd /c #{command}'
68+
{ cmd, _ } -> '#{cmd} /c #{command}'
6969
end
7070
end
7171
end

0 commit comments

Comments
 (0)