TIL about shellscripts: the following failes due to set -e, but not how you might expect:
[#]!/bin/sh -e foo() { false && echo no } foo exit 0
exits with status 1.
Why? Becaus it breaks due to -e on "false"? Not quite - when adding any other successfull command in the line after false all is good. But the exitcode from false seems to propagates as the code from "foo()", leading to abort after exiting foo (before exiting with "exit 0").
=> More informations about this toot | View the thread | More toots from moho1@social.troll.academy
text/gemini
This content has been proxied by September (ba2dc).