CallMeAl (like Alan)@piefed.world to linuxmemes@lemmy.worldEnglish · 4 months agosystem roulette anyone?media.piefed.worldimagemessage-square17linkfedilinkarrow-up1210arrow-down19
arrow-up1201arrow-down1imagesystem roulette anyone?media.piefed.worldCallMeAl (like Alan)@piefed.world to linuxmemes@lemmy.worldEnglish · 4 months agomessage-square17linkfedilink
minus-squareNeatNit@discuss.tchncs.delinkfedilinkarrow-up16·4 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.