Remix.run Logo
rixed an hour ago

One hour ago, while looking casually at a package.json, I saw this and was horrified:

  rm -rf pkg/snippets & rmdir pkg\\snippets /s /q & wasm-pack build --target bundler && node prepare-web.js
Looked like a strange mix of unix shell and msdos batch that would, on my box, try to rmdir "/s" and "/q". I asked Claude about this, and he replied something like "Yes that's a standard and clever hack to delete a directory that works both on linux and windows!".

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.

The industry is the process by which convenient crap like this gets standardized.

tremon 18 minutes ago | parent | next [-]

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.

lokar an hour ago | parent | prev | next [-]

Yikes. I would never approve a PR with that in it.

cozzyd 42 minutes ago | parent | prev | next [-]

I hope the "standard" part is as much of a hallucination as "clever" is

PunchyHamster 43 minutes ago | parent | prev [-]

> 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