that is why you don't run random install script as root
i hate that so many tools nowadays want you to curl | sh for installing
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
that is why you don't run random install script as root
i hate that so many tools nowadays want you to curl | sh for installing
Glad I'm not the only one. It's always the shell apps that use annoying emojis too
i hate that so many tools nowadays want you to
curl | shfor installing
Using NixOS has the advantage of making me not want to touch these tools. If I can't install it reproducibly with Nix, I'll just look for an alternative :)
This is from 15 years ago. How many more times will we have to see it?
Here's an infamous one:
https://hackaday.com/2024/01/20/how-a-steam-bug-once-deleted-all-of-someones-user-data/
This entire thread is giving me flashbacks to my junior dev days and forgetting a where clause when updating/deleting database records

We've all done that at some point.
That sinking feeling when your quick update doesn't return immediately.
Good to get into the habit of wrapping your queries in a begin transaction/rollback until you verify the result 😁
I was never able to fully form the habit with transactions. The guardrails I use are writing the where clause first and keeping my query tool in read-only mode for prod connections and only disabling it once I'm sure I need to make a change.
https://github.com/ValveSoftware/steam-for-linux/issues/3671
Another classic
rm -rf "$STEAMROOT/"* could be evaluated as rm -rf "/"* if $STEAMROOT is empty
Ah, good times.
I love how someone committed # scary! above it rather than fixing it.
Probably a good idea to enable the nounset shell option when shipping commercial-grade install scripts. 😅
Or just include the trailing slash in $STEAMROOT, so that if the variable is empty, it will evaluate to rm -rf "" and do nothing.
That seems like a more error-prone solution than the shell option. That would make it evaluate to rm -rf * which would probably delete your home directory, I'm guessing. And also put the burden of knowing the slash needs to be included on something completely disconnected from the expression. Nah, don't do it like that.
That really ought to have been the default behavior. Opting out only takes one or two extra characters. Well, three or four if you don't habitually bracket your variable names, which you should probably be doing anyways
Wow.
That's a nuclear grade 'oopsie' right there hahaha!
Jeez. Didn't hear about that one, back in the day.... wow.
Linux Gaming has had some interesting moments
"Just a prank bro!"
I think I had accidentally deleted /bin with that script I had made when I was testing debian https://github.com/BlastboomStrice/3rdPartyAutoUpdater
"typo" :D
What do you mean? Hitting space while typing out a path is very much a typo. Am I missing something?
They're jokingly implying it was intentional
yeah you missed the joke i guess
Explain the joke! ;-;
"hahaha ubuntu users take this"
I... see.