CallMeAl (like Alan)@piefed.world to linuxmemes@lemmy.worldEnglish · 2 months agosystem roulette anyone?imagemessage-square3linkfedilinkarrow-up16arrow-down10
arrow-up16arrow-down1imagesystem roulette anyone?CallMeAl (like Alan)@piefed.world to linuxmemes@lemmy.worldEnglish · 2 months agomessage-square3linkfedilink
minus-squareNeatNit@discuss.tchncs.delinkfedilinkarrow-up1·2 months agoTook me a while to understand what you’re warning against. Allow me to rephrase, and tell me if I got it wrong. The || will execute what’s after it in two cases: The preceding command (in this case the rm) never ran because of an earlier && The preceding command ran and returned nonzero OP’s code relies on the 1 case, but wrongly assumed that the 2 case will never happen. That’s the footgun.
Took me a while to understand what you’re warning against. Allow me to rephrase, and tell me if I got it wrong.
The
||will execute what’s after it in two cases:rm) never ran because of an earlier&&OP’s code relies on the 1 case, but wrongly assumed that the 2 case will never happen. That’s the footgun.