File tree Expand file tree Collapse file tree 2 files changed +4
-27
lines changed Expand file tree Collapse file tree 2 files changed +4
-27
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ defmodule Mix.Deps.Lock do
26
26
"""
27
27
def touch ( manifest_path ) do
28
28
File . mkdir_p! ( manifest_path )
29
- File . write! ( Path . join ( manifest_path , @ manifest ) , " #{ System . version } \n #{ Mix . env } " )
29
+ File . write! ( Path . join ( manifest_path , @ manifest ) , System . version )
30
30
end
31
31
32
32
@ doc """
@@ -40,30 +40,11 @@ defmodule Mix.Deps.Lock do
40
40
Returns the elixir version in the lock manifest in the given path.
41
41
"""
42
42
def elixir_vsn ( manifest_path ) do
43
- read_manifest ( manifest_path ) |> elem ( 0 )
44
- end
45
-
46
- @ doc """
47
- Returns the mix env in the lock manifest unless it is an umbrella app.
48
- """
49
- def mix_env ( ) do
50
- unless Mix.Project . umbrella? , do: mix_env ( Mix.Project . manifest_path )
51
- end
52
-
53
- @ doc """
54
- Returns the mix env version in the lock manifest in the given path.
55
- """
56
- def mix_env ( manifest_path ) do
57
- read_manifest ( manifest_path ) |> elem ( 1 )
58
- end
59
-
60
- defp read_manifest ( manifest_path ) do
61
43
case File . read ( manifest ( manifest_path ) ) do
62
44
{ :ok , contents } ->
63
- destructure [ vsn , env ] , String . split ( contents , "\n " )
64
- { vsn , env }
45
+ contents
65
46
{ :error , _ } ->
66
- { nil , nil }
47
+ nil
67
48
end
68
49
end
69
50
Original file line number Diff line number Diff line change @@ -26,15 +26,11 @@ defmodule Mix.Deps.LockTest do
26
26
end
27
27
end
28
28
29
- test "stores version and env in manifest" do
29
+ test "stores version in manifest" do
30
30
in_fixture "no_mixfile" , fn ->
31
31
assert nil? Mix.Deps.Lock . elixir_vsn
32
- assert nil? Mix.Deps.Lock . mix_env
33
-
34
32
Mix.Deps.Lock . touch
35
-
36
33
assert Mix.Deps.Lock . elixir_vsn == System . version
37
- assert Mix.Deps.Lock . mix_env == "dev"
38
34
end
39
35
end
40
36
end
You can’t perform that action at this time.
0 commit comments