I've seen a lot of scripts written in my career and most of them do things that scare me. It boils down to “explicit is better than implicit”, and there are too many lazy or careless developers out there.
Another good reason to demand open-source, to have a fighting chance that someone has proofread what is about to ask for admin privileges.
More than once I've seen people using "rm -Rf" habitually whether the target is a file or a directory, because it will basically always work (remembering when to use "rmdir" is apparently hard). Well, great...now the side effects of using "rm -Rf ${dir}/${file}" where there's an undefined variable are just a bit ridiculous when all you wanted to do was delete a temporary file.
Yev from Backblaze here -> sorry! It took us all day to figure out what the hell was going on. Kept getting folks writing in, when nothing had changed on our end. Our Mac dev probably left a dent in his wall from trying to figure it out. We finally narrowed it down to the ACC update. Then realized that WE were affected more than most apps simply because .bzvol starts with a "B" and so a bunch of our users were affected. Likely if a user had a hidden folder with data in it named anything /.0-/.a that folder's data could have been removed as well (we tested this). So hopefully they had a backup/hidden folders are rare and few were affected.
Another good reason to demand open-source, to have a fighting chance that someone has proofread what is about to ask for admin privileges.
More than once I've seen people using "rm -Rf" habitually whether the target is a file or a directory, because it will basically always work (remembering when to use "rmdir" is apparently hard). Well, great...now the side effects of using "rm -Rf ${dir}/${file}" where there's an undefined variable are just a bit ridiculous when all you wanted to do was delete a temporary file.