in pyproject.toml or its equivalent in hatch.toml and run
hatch fmt --sync
it overwrites pyproject.toml.
While this is perfectly consistent behavior, it can't be what the user wants. Issuing this command with this configuration is a mistake. I discovered it when exploring Hatch. Without a backup, I would have lost a bit of work on pyproject.toml. I think Hatch should abort such sync or ask for confirmation.
When you have
in
pyproject.toml
or its equivalent inhatch.toml
and runit overwrites
pyproject.toml
.While this is perfectly consistent behavior, it can't be what the user wants. Issuing this command with this configuration is a mistake. I discovered it when exploring Hatch. Without a backup, I would have lost a bit of work on
pyproject.toml
. I think Hatch should abort such sync or ask for confirmation.Demo