-
-
Save samueldr/dcffee38125d6aa61723d324d1b0f26c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
shopt -s inherit_errexit | |
set -e | |
fn() { | |
false | |
echo FAIL | |
} | |
echo "It will print FAIL, and it's terrible" | |
fn && echo 'uh?' | |
echo "It will not print FAIL, which partially is terrible considering the preceding" | |
fn | |
echo "It will have aborted." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment