Closed Rubonnek closed 3 years ago
Thanks for proposing this. This definitely make chezmoi more user friendly. I've just tagged version 1.7.9 which includes a fix for this - it'll take about 10 minutes to appear on the releases page.
Thank you!
I'm able to replicate this issue once again in chezmoi version v2.0.10. Seems to be a regression.
To reproduce:
echo 'a' > .myfile.config
chezmoi add -T .myfile.config
chezmoi add .myfile.config
Thank you!!
Describe the bug Say
myfile.config.tmpl
exists in the chezmoi repo,chezmoi add myfile.config
removes the template.To reproduce
Expected behavior Perhaps chezmoi should warn the user that a template file would be removed by this action and then perhaps either prompt the user to add the file or simply do nothing about it.
Output of command with
--verbose
Output of
chezmoi doctor
Additional context I still have the bad habit of using
chezmoi add
instead ofchezmoi edit
for files I already added to the repo. I'd rather have an early warning than blow away a template file that might have not been committed to the repo.