Introduce errtrace, which is on by default (BREAKING)

This commit is contained in:
Kevin van Zonneveld 2016-06-21 13:36:48 +02:00
parent f7fc992b2d
commit 649b5a0f44
2 changed files with 3 additions and 0 deletions

View File

@ -4,6 +4,7 @@
Released: Unreleased. [Commit log](https://github.com/kvz/bash3boilerplate/compare/v2.0.0...master)
- Introduce `errtrace`, which is on by default (BREAKING)
- Add a configurable `helptext` that is left alone by the parses and allows you to have a richer help
- Add a simple documentation website
- Add best practice of using `__double_underscore_prefixed_vars` to indicate global variables that are solely controlled inside your script

View File

@ -37,6 +37,8 @@
# `set` is safer than relying on a shebang like `#!/bin/bash -e` because that is neutralized
# when someone runs your script as `bash yourscript.sh`
set -o errexit
# Exit on error inside any functions or subshells.
set -o errtrace
set -o nounset
# Bash will remember & return the highest exitcode in a chain of pipes.