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
3636 def path_for ( :escript ) , do: Mix . path_for ( :escripts )
3737
3838 @ doc """
39- Appends archives paths into Erlang code path.
39+ Appends archive paths to the Erlang code path.
4040 """
4141 def append_archives do
4242 for archive <- archives_ebins ( ) do
@@ -48,7 +48,18 @@ defmodule Mix.Local do
4848 end
4949
5050 @ 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.
5263 """
5364 def append_paths do
5465 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
1919 File . rm_rf! ( tmp_path ( "userhome" ) )
2020 System . put_env ( "MIX_ARCHIVES" , tmp_path ( "userhome/.mix/archives/" ) )
2121 Mix.Project . push ( ArchiveProject )
22- :ok
22+
23+ on_exit ( fn ->
24+ Mix.Local . remove_archives ( )
25+ System . delete_env ( "MIX_ARCHIVES" )
26+ end )
2327 end
2428
2529 test "archive build" do
You can’t perform that action at this time.
0 commit comments