Skip to content

Commit 11086ac

Browse files
author
José Valim
committed
Include the environment in missing dep error message, closes #7331
1 parent 0c81857 commit 11086ac

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/mix/lib/mix/tasks/format.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ defmodule Mix.Tasks.Format do
224224
:error ->
225225
Mix.raise(
226226
"Unknown dependency #{inspect(dep)} given to :import_deps in the formatter configuration. " <>
227-
"The dependency is not listed in your mix.exs file"
227+
"The dependency is not listed in your mix.exs for environment #{inspect(Mix.env())}"
228228
)
229229
end
230230
end

lib/mix/test/mix/tasks/format_test.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ defmodule Mix.Tasks.FormatTest do
239239

240240
message =
241241
"Unknown dependency :nonexistent_dep given to :import_deps in the formatter configuration. " <>
242-
"The dependency is not listed in your mix.exs file"
242+
"The dependency is not listed in your mix.exs for environment :dev"
243243

244244
assert_raise Mix.Error, message, fn -> Mix.Tasks.Format.run([]) end
245245
end

0 commit comments

Comments
 (0)