Skip to content

Instantly share code, notes, and snippets.

@stevekuznetsov
Created November 5, 2015 14:43
Show Gist options
  • Save stevekuznetsov/5cbcf013946f6ba681d3 to your computer and use it in GitHub Desktop.
Save stevekuznetsov/5cbcf013946f6ba681d3 to your computer and use it in GitHub Desktop.
MWE for fail
#!/bin/bash
set -o errexit
set -o nounset
set -o pipefail
source test/cmd/util.sh
output=$(expect_code 'exit 1' '0' 2>&1 || true)
echo "Won't see this, fails on above line"
@stevekuznetsov
Copy link
Author

@Miciah I'm on:

GNU bash, version 4.3.42(1)-release (x86_64-redhat-linux-gnu)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment