Skip to content

Commit ed035ad

Browse files
committed
Merge pull request #3727 from eksperimental/mix_nolock
Mix.Dep: show instructions on :nolock and :lockoutdated
2 parents 3517ba1 + 067b7ec commit ed035ad

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

lib/mix/lib/mix/dep.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,10 +167,10 @@ defmodule Mix.Dep do
167167
do: "lock mismatch: the dependency is out of date (run \"mix deps.get\" to fetch locked version)"
168168

169169
def format_status(%Mix.Dep{status: :lockoutdated}),
170-
do: "lock outdated: the lock is outdated compared to the options in your mixfile"
170+
do: "lock outdated: the lock is outdated compared to the options in your mixfile (run \"mix deps.get\" to fetch locked version)"
171171

172172
def format_status(%Mix.Dep{status: :nolock}),
173-
do: "the dependency is not locked"
173+
do: "the dependency is not locked (run \"mix deps.get\" to generate \"mix.lock\" file)"
174174

175175
def format_status(%Mix.Dep{status: :compile}),
176176
do: "the dependency build is outdated, please run \"#{mix_env_var}mix deps.compile\""

lib/mix/test/mix/tasks/deps.git_test.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ defmodule Mix.Tasks.DepsGitTest do
268268
refresh deps: [{:git_repo, "0.1.0", git: fixture_path("git_repo"), ref: last}]
269269

270270
Mix.Tasks.Deps.run []
271-
msg = " lock outdated: the lock is outdated compared to the options in your mixfile"
271+
msg = " lock outdated: the lock is outdated compared to the options in your mixfile (run \"mix deps.get\" to fetch locked version)"
272272
assert_received {:mix_shell, :info, [^msg]}
273273

274274
# Check an update was triggered

lib/mix/test/mix/tasks/deps_test.exs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ defmodule Mix.Tasks.DepsTest do
104104

105105
Mix.Tasks.Deps.run []
106106
assert_received {:mix_shell, :info, ["* ok (https://github.com/elixir-lang/ok.git)"]}
107-
assert_received {:mix_shell, :info, [" the dependency is not locked"]}
107+
assert_received {:mix_shell, :info, [" the dependency is not locked (run \"mix deps.get\" to generate \"mix.lock\" file)"]}
108108

109109
Mix.Dep.Lock.write %{ok: {:git, "git://github.com/elixir-lang/ok.git", "abcdefghi", []}}
110110
Mix.Tasks.Deps.run []
@@ -117,7 +117,7 @@ defmodule Mix.Tasks.DepsTest do
117117
Mix.Tasks.Deps.run []
118118

119119
assert_received {:mix_shell, :info, ["* ok (https://github.com/elixir-lang/ok.git)"]}
120-
assert_received {:mix_shell, :info, [" lock outdated: the lock is outdated compared to the options in your mixfile"]}
120+
assert_received {:mix_shell, :info, [" lock outdated: the lock is outdated compared to the options in your mixfile (run \"mix deps.get\" to fetch locked version)"]}
121121
end
122122
end
123123

0 commit comments

Comments
 (0)