Need some clarification on `clean` command
See original GitHub issueFirst of all I want to thank you for this project. Just found it today and in love with it 😃 Also, before we continue here, it worth to mention, that english aint my native, so I appologize for any mistakes and misunderstandings in advance.
And now to the point - my question is why
Only dead links that point to the dotfiles directory are removed.
https://github.com/anishathalye/dotbot/blob/master/plugins/clean.py#L39
Is there any funny story behind this check? Like someone unmounted folder on a prod environment, Dotbot deleted broken link and after remounting folder back - server just crushed?
Seriously, I mean, it seems totally illogicaly for me: we have a dead link, that points to nowhere, and instead of clean/overwrite, we just leave it for the gods of errors during futher installation process.
Like, for example, I’ve a link ~/.zshrc_alias -> /dev/null
that was pointing to some real object in the past, but somehow it’s gone now. And… I can’t delete it and therefore create a new link that will point to my new file ~/.dotfiles/.zshrc_alias
.
Just want to understand such implementation before I’ll begin using my patronus on it 😄
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (5 by maintainers)
Top GitHub Comments
Also, regarding to this plugin, it was meant that method
self._clean
always returnTrue
? https://github.com/anishathalye/dotbot/blob/master/plugins/clean.py#L28And if so, then why do we need this
else
statemend with logging if we’ll never reach that point?p.s. Damn, I’m getting addicted to this thing. Even thinking about to write a plugin for handling metaconfigs 😄
Question answered 😃