Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'm sorry, but running `rm -rf ...` in a script against $HOME is a bit too reckless for me.

Maybe you haven't lost data from this yet, but this is where Chezmoi has nice guardrails and protects against, e.g., modifications or additions accidentally being made to $HOME instead of the dotfiles dir, which look like they would be silently blown out by your current process.

Just my 2¢ from someone who used to do it this way and lost data because of it.



What do you think is the risk here? I don’t see a code path to remove my home dir in the script

EDIT: Unless I have a dir called "*" in my dotfiles, but at that point I deserve to have my home dir removed :P ZSH also asks for confirmation first




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: