Skip to content

Commit 43788c0

Browse files
committed
Use Mix.shell().error() for compiler tasks warnings
1 parent 25e6ce4 commit 43788c0

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/mix/lib/mix/tasks/compile.leex.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ defmodule Mix.Tasks.Compile.Leex do
6666
defp preload(project) do
6767
# TODO: Remove me in Elixir v2.0
6868
unless :leex in List.wrap(project[:compilers]) do
69-
IO.warn(
70-
"in order to compile .xrl files, you must add \"compilers: [:leex] ++ Mix.compilers()\" to the \"def project\" section of #{project[:app]}'s mix.exs"
69+
Mix.shell().error(
70+
"warning: in order to compile .xrl files, you must add \"compilers: [:leex] ++ Mix.compilers()\" to the \"def project\" section of #{project[:app]}'s mix.exs"
7171
)
7272
end
7373

lib/mix/lib/mix/tasks/compile.yecc.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ defmodule Mix.Tasks.Compile.Yecc do
6767
defp preload(project) do
6868
# TODO: Remove me in Elixir v2.0
6969
unless :yecc in List.wrap(project[:compilers]) do
70-
IO.warn(
71-
"in order to compile .yrl files, you must add \"compilers: [:yecc] ++ Mix.compilers()\" to the \"def project\" section of #{project[:app]}'s mix.exs"
70+
Mix.shell().error(
71+
"warning: in order to compile .yrl files, you must add \"compilers: [:yecc] ++ Mix.compilers()\" to the \"def project\" section of #{project[:app]}'s mix.exs"
7272
)
7373
end
7474

0 commit comments

Comments
 (0)