From fb30cabe61862f640f0e99f214dc2777a8ec1b35 Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Tue, 30 Jul 2013 11:00:54 -0400 Subject: common: Properly forward arguments from die to error Also allow this function to be called without arguments, in which case, don't call error at all. Some uses of this function wrongly assumed that this was already allowed. Signed-off-by: Dave Reisner Signed-off-by: Pierre Schmitz --- lib/common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/common.sh b/lib/common.sh index 9446ff5..3ec26ff 100644 --- a/lib/common.sh +++ b/lib/common.sh @@ -82,7 +82,7 @@ trap_exit() { } die() { - error "$*" + (( $# )) && error "$@" cleanup 1 } -- cgit v1.2.3-70-g09d2