Replies: 1 comment 1 reply
-
Just sharing my experience, I too fail until I succeed (probably a trait of my ADHD). But after I got burnt once doing something stupid with chezmoi, I learned to read the docs, which are excellent. That being said, maybe some overcautious defaults which can be overridden later might be a good idea. For the time being, you may be able to configure some rational defaults that work for you - and then you can suggest these to the community? For example: Or maybe add purge operations to the warnings mechanism, and allow disabling those for those who know what they are doing. I'm sure one of the maintainers might join this conversation and offer some wisdom (or a solution) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I've been migrating from a standard git repo in my home directory to chezmoi for dotfile management. I appreciate chezmoi's security and templating features, but encountered an issue with the
init --one-shot
command that I'd like to provide feedback on.While experimenting with the "Once" prompt types in my
.chezmoi.toml.tmpl
file, I needed to re-run these prompts for testing. I ranchezmoi init -h
and noticed the--one-shot
option with the description "Run in one-shot mode" - which wasn't descriptive enough to understand its function.I mistakenly associated "one-shot" with "once" prompts and ran
chezmoi init --one-shot
while having unsaved changes in my working directory. The command failed with an error message, but more importantly, it wiped out my entire working copy. While I was able to restore the repository withchezmoi init <github-username>
, I lost most of my local changes.I take responsibility for not fully understanding the command before running it. However, I believe commands with destructive potential should have additional safeguards:
I later discovered the
--prompt
option, which was actually what I needed, but overlooked at the time.I hope this feedback helps improve the user experience for others who might encounter similar situations.
Beta Was this translation helpful? Give feedback.
All reactions