Skip to content

Instantly share code, notes, and snippets.

@samueldr

samueldr/test.sh Secret

Created October 29, 2020 23:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samueldr/dcffee38125d6aa61723d324d1b0f26c to your computer and use it in GitHub Desktop.
Save samueldr/dcffee38125d6aa61723d324d1b0f26c to your computer and use it in GitHub Desktop.
#!/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