File tree Expand file tree Collapse file tree 2 files changed +18
-3
lines changed Expand file tree Collapse file tree 2 files changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ defmodule Mix.Local do
36
36
def path_for ( :escript ) , do: Mix . path_for ( :escripts )
37
37
38
38
@ doc """
39
- Appends archives paths into Erlang code path.
39
+ Appends archive paths to the Erlang code path.
40
40
"""
41
41
def append_archives do
42
42
for archive <- archives_ebins ( ) do
@@ -48,7 +48,18 @@ defmodule Mix.Local do
48
48
end
49
49
50
50
@ doc """
51
- Appends Mix paths into Erlang code path.
51
+ Removes archive paths from Erlang code path.
52
+ """
53
+ def remove_archives do
54
+ for archive <- archives_ebins ( ) do
55
+ Code . delete_path ( archive )
56
+ end
57
+
58
+ :ok
59
+ end
60
+
61
+ @ doc """
62
+ Appends Mix paths to the Erlang code path.
52
63
"""
53
64
def append_paths do
54
65
Enum . each ( mix_paths ( ) , & Code . append_path ( & 1 ) )
Original file line number Diff line number Diff line change @@ -19,7 +19,11 @@ defmodule Mix.Tasks.ArchiveTest do
19
19
File . rm_rf! ( tmp_path ( "userhome" ) )
20
20
System . put_env ( "MIX_ARCHIVES" , tmp_path ( "userhome/.mix/archives/" ) )
21
21
Mix.Project . push ( ArchiveProject )
22
- :ok
22
+
23
+ on_exit ( fn ->
24
+ Mix.Local . remove_archives ( )
25
+ System . delete_env ( "MIX_ARCHIVES" )
26
+ end )
23
27
end
24
28
25
29
test "archive build" do
You can’t perform that action at this time.
0 commit comments