• OwOarchist@pawb.social
    link
    fedilink
    English
    arrow-up
    97
    ·
    14 hours ago

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

    Ah, good times.

    • Victor@lemmy.world
      link
      fedilink
      arrow-up
      15
      ·
      7 hours ago

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

      • fruitcantfly@programming.dev
        link
        fedilink
        arrow-up
        2
        ·
        edit-2
        38 minutes 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