• zitrone 🍋@europe.pub
    link
    fedilink
    arrow-up
    29
    ·
    24 hours ago

    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

    • w33n1s@lemmy.world
      link
      fedilink
      arrow-up
      5
      ·
      17 hours ago

      Glad I’m not the only one. It’s always the shell apps that use annoying emojis too

    • SpatchyIsOnline@lemmy.world
      link
      fedilink
      arrow-up
      4
      ·
      23 hours ago

      i hate that so many tools nowadays want you to curl | sh for 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 :)

  • axx@slrpnk.net
    link
    fedilink
    arrow-up
    9
    ·
    23 hours ago

    This is from 15 years ago. How many more times will we have to see it?

  • bitjunkie@lemmy.world
    link
    fedilink
    arrow-up
    42
    ·
    edit-2
    1 day ago

    This entire thread is giving me flashbacks to my junior dev days and forgetting a where clause when updating/deleting database records

    • Buckshot@programming.dev
      link
      fedilink
      arrow-up
      15
      ·
      1 day ago

      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 😁

      • bitjunkie@lemmy.world
        link
        fedilink
        arrow-up
        11
        ·
        edit-2
        1 day ago

        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.

    • OwOarchist@pawb.social
      link
      fedilink
      English
      arrow-up
      121
      ·
      2 days ago

      rm -rf “$STEAMROOT/”* could be evaluated as rm -rf “/”* if $STEAMROOT is empty

      Ah, good times.

      • Victor@lemmy.world
        link
        fedilink
        arrow-up
        27
        ·
        1 day ago

        Probably a good idea to enable the nounset shell option when shipping commercial-grade install scripts. 😅

        • OwOarchist@pawb.social
          link
          fedilink
          English
          arrow-up
          4
          ·
          1 day ago

          Or just include the trailing slash in $STEAMROOT, so that if the variable is empty, it will evaluate to rm -rf "" and do nothing.

          • Victor@lemmy.world
            link
            fedilink
            arrow-up
            7
            ·
            1 day ago

            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.

        • fruitcantfly@programming.dev
          link
          fedilink
          arrow-up
          7
          ·
          edit-2
          1 day ago

          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

      • sbeak@sopuli.xyz
        link
        fedilink
        English
        arrow-up
        18
        ·
        1 day ago

        Ubuntu is owned by Canonical, and they have been making some decisions that a lot of people in the community don’t like, most notably, the enforcement of snaps (in a nutshell, the repos are proprietary and centralised), but they have been involved in various other corpo shenanigans as well

        But I don’t think “X distro is bad, don’t use it” is very useful unless it is dangerous or harmful to the user.

        Ubuntu (or the various other buntus) work for some people, and without them, far fewer people would use Linux. The benefit of Linux is the amount of choice you get and being able to easily switch between distros (you can even dual boot if you want!)

        So if you like Mint, stick with that. If somebody prefers the buntus, it’s great as long as they are respectful to others!

        Distro wars are stupid

        • forestbeasts@pawb.social
          link
          fedilink
          arrow-up
          2
          ·
          15 hours ago

          Oh and BTW Mint is fine! It’s based on Ubuntu sure, but actively undoes and strips out the crappy stuff Ubuntu adds.

          They also have Linux Mint Debian Edition as a backup in case Ubuntu goes really evil.

          – Frost

      • MrKoyun@lemmy.world
        link
        fedilink
        arrow-up
        11
        ·
        1 day ago

        It’s not really bad. It’s just kinda distasteful due to stuff like Snap packages and Canonical’s position of privacy as a company. But it isn’t really a bad distro if you ignore that stuff. If it works it works.

      • nil@piefed.ca
        link
        fedilink
        English
        arrow-up
        11
        ·
        1 day ago

        Ubuntu kinda forces you to use snap (which sucks), and is owned by Canonical.

        Neither of them apply to Linux Mint, so nice choice.