-
-
Notifications
You must be signed in to change notification settings - Fork 60
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Versions
Elixir 1.18.4
Erlang/OTP 28.0.1
Operating system
macOS
Current Behavior
When the updater returns :error, a new config entry is added:
Update: config/config.exs
1 1 |import Config
2 2 |
3 - |config :my_app, foo: [
4 - | bar: :baz
5 - |]
3 + |config :my_app, foo: nil
6 4 |
5 + |config :my_app,
6 + | foo: [
7 + | bar: :baz
8 + | ]
9 +
Reproduction
igniter =
Igniter.Test.test_project(
files: %{
"config/config.exs" => """
import Config
config :my_app, foo: [
bar: :baz
]
"""
}
)
if Igniter.Project.Config.configures_key?(igniter, "config.exs", :my_app, :foo) do
Igniter.Project.Config.configure(igniter, "config.exs", :my_app, :foo, nil,
updater: fn _zipper -> :error end
)
else
igniter
end
|> Igniter.Test.diff()
|> IO.puts()Expected Behavior
The config should stay as is, since the updater failed.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working