summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2013-07-30 11:00:54 -0400
committerPierre Schmitz <pierre@archlinux.de>2013-08-08 21:28:00 +0200
commitfb30cabe61862f640f0e99f214dc2777a8ec1b35 (patch)
tree60999b6849a9ac55de1740109be354a5462264ce /lib
parent29e62278a7379336e5972df5bad751c973872039 (diff)
downloaddevtools32-fb30cabe61862f640f0e99f214dc2777a8ec1b35.tar.xz
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 <dreisner@archlinux.org> Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
Diffstat (limited to 'lib')
-rw-r--r--lib/common.sh2
1 files changed, 1 insertions, 1 deletions
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
}