Skip to content

Commit 272be2c

Browse files
author
José Valim
committed
Work around and document for mix test on windows, closes #2375
1 parent 911acc3 commit 272be2c

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

lib/mix/test/mix/tasks/local_test.exs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,14 @@ defmodule Mix.Tasks.LocalTest do
4949
send self, {:mix_shell_input, :yes?, true}
5050
Mix.Tasks.Local.Install.run []
5151
assert File.regular? tmp_path("userhome/.mix/archives/archive-0.2.0.ez")
52-
refute File.regular? tmp_path("userhome/.mix/archives/archive-0.1.0.ez")
52+
53+
# We don't do the assertion below on Windows because
54+
# the archive is open by Erlang code server and the archive
55+
# is not effectively removed until the Erlang process exits.
56+
unless match? {:win32, _}, :os.type do
57+
refute File.regular? tmp_path("userhome/.mix/archives/archive-0.1.0.ez")
58+
end
59+
5360
Mix.Local.append_archives
5461

5562
# Remove it!

0 commit comments

Comments
 (0)