From aa727b8868b428a6b75e0d48a854be65242b257c Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Sun, 10 Nov 2013 15:25:23 +0100 Subject: o Automatically fetching Bats if not installed. --- STYLE-GUIDE.txt | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'STYLE-GUIDE.txt') diff --git a/STYLE-GUIDE.txt b/STYLE-GUIDE.txt index 77dce24..4eab7c2 100644 --- a/STYLE-GUIDE.txt +++ b/STYLE-GUIDE.txt @@ -43,8 +43,21 @@ usage_text() { Executing Commands ================== +When chaining commands look at `pipefail`. + * http://unix.stackexchange.com/q/23026 +If you want to fail this shell if a sub-shell fails, use this form: + +---------------------------------------------------------------------- +ENV=$(app conf get app.env) || false +---------------------------------------------------------------------- + +The sub-shell will exit with a non-zero exit code, but even with `-e` +set bash won't exit the current shell. + +See also http://www.fvue.nl/wiki/Bash:_Error_handling. + Parsing options =============== -- cgit v1.2.3