upvote
To meekly defend the indefensible here: it's not like rmdir on Linux (I won't speak for all Unixen) can cause loss of data, since it only removes empty directories.
reply
Yep, but that could still cause issues (those entries could be used as signals, or be mount points for currently unmounted partitions, etc). rmdir anything that start with "/" should be an absolute no-go.

To say nothing about running a sequence of shell commands without the -e option.

reply
In this case, the rm -rf before that does. The rmdir is the Windows command in this example and with /s /q, it will quietly delete everything.
reply
Yikes. I would never approve a PR with that in it.
reply
Your agent might!
reply
I hope the "standard" part is as much of a hallucination as "clever" is
reply
> Poor Claude has been trained on so much awful human code that it required several prompts for it to admit that there was indeed a problem.

Claude probably birthed this abomination in the first place

reply