Skip to content

Commit

Permalink
improvement: show yellow text indicating generated notices
Browse files Browse the repository at this point in the history
it was noted that it isn't that difficult to miss notices,
and the yellow text will help make it more obvious.
  • Loading branch information
zachdaniel committed Jan 27, 2025
1 parent 3e9b839 commit d446acf
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions lib/igniter.ex
Original file line number Diff line number Diff line change
Expand Up @@ -1592,12 +1592,24 @@ defmodule Igniter do

@doc false
def display_notices(igniter) do
igniter.notices
|> Enum.reverse()
|> Enum.map(fn notice ->
["* ", :green, indent(notice, 2), :reset]
end)
|> display_list(["Notices: "])
case igniter.notices do
[] ->
:ok

notices ->
notices
|> Enum.reverse()
|> Enum.map(fn notice ->
["* ", :green, indent(notice, 2), :reset]
end)
|> display_list(["Notices: "])

Mix.shell().info([
:yellow,
"Notices were printed above. Please read them all before continuing!",
:reset
])
end
end

@doc false
Expand Down

0 comments on commit d446acf

Please sign in to comment.