File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed
Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -131,6 +131,14 @@ defmodule Mix.SCM do
131131 Mix.State . get ( :scm )
132132 end
133133
134+ @ doc """
135+ Deletes the given SCM from the list of available SCMs.
136+ """
137+ @ doc since: "1.16.2"
138+ def delete ( mod ) when is_atom ( mod ) do
139+ Mix.State . update ( :scm , & List . delete ( & 1 , mod ) )
140+ end
141+
134142 @ doc """
135143 Prepends the given SCM module to the list of available SCMs.
136144 """
Original file line number Diff line number Diff line change @@ -12,10 +12,14 @@ defmodule Mix.SCMTest do
1212 test "prepends an SCM" do
1313 Mix.SCM . prepend ( Hello )
1414 assert Enum . at ( Mix.SCM . available ( ) , 0 ) == Hello
15+ Mix.SCM . delete ( Hello )
16+ assert Hello not in Mix.SCM . available ( )
1517 end
1618
1719 test "appends an SCM" do
1820 Mix.SCM . append ( Hello )
1921 assert Enum . at ( Mix.SCM . available ( ) , - 1 ) == Hello
22+ Mix.SCM . delete ( Hello )
23+ assert Hello not in Mix.SCM . available ( )
2024 end
2125end
You can’t perform that action at this time.
0 commit comments