3 ms·
When writing test cases in shell, you generally just implement a die() function and execute all commands `foo || die "bar"`
by stingraycharles 12y ago
When writing test cases in shell, you generally just implement a die() function and execute all commands `foo || die "bar"`
- nitrogen 12y agoIf you don't need to specify a custom message, you could also use "set -e" to die automatically on command failure and use "trap ... EXIT" to display some kind of failure message.