chore: fix hardcoded :prod values
Some checks failed
CI / ash-ci (push) Has been cancelled

This commit is contained in:
Zach Daniel 2024-09-06 15:52:19 -04:00
parent dbf1386fcf
commit 13f7327e4b

View file

@ -50,12 +50,12 @@ defmodule Igniter.Project.Config do
|> Igniter.update_elixir_file("config/runtime.exs", fn zipper -> |> Igniter.update_elixir_file("config/runtime.exs", fn zipper ->
patterns = [ patterns = [
""" """
if config_env() == :prod do if config_env() == #{inspect(env)} do
__cursor__() __cursor__()
end end
""", """,
""" """
if :prod == config_env() do if #{inspect(env)} == config_env() do
__cursor__() __cursor__()
end end
""" """
@ -82,7 +82,7 @@ defmodule Igniter.Project.Config do
:error -> :error ->
zipper zipper
|> Igniter.Code.Common.add_code(""" |> Igniter.Code.Common.add_code("""
if config_env() == :prod do if config_env() == #{inspect(env)} do
end end
""") """)
|> Igniter.Code.Common.move_to_cursor_match_in_scope(patterns) |> Igniter.Code.Common.move_to_cursor_match_in_scope(patterns)
@ -109,7 +109,7 @@ defmodule Igniter.Project.Config do
```elixir ```elixir
# in `runtime.exs` # in `runtime.exs`
if config_env() == :prod do if config_env() == #{inspect(env)} do
# Please configure #{inspect([app_name | config_path])} it to the following value # Please configure #{inspect([app_name | config_path])} it to the following value
#{value} #{value}
end end