From 6db31cc16a8044272170204975378ece8eb94e2a Mon Sep 17 00:00:00 2001
From: BlackEagle <ike.devolder@gmail.com>
Date: Sun, 16 Feb 2014 09:55:59 +0100
Subject: [PATCH] when cleanup is called without code exit with 0

Signed-off-by: BlackEagle <ike.devolder@gmail.com>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
---
 lib/common.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/common.sh b/lib/common.sh
index 04a282b..1009e90 100644
--- a/lib/common.sh
+++ b/lib/common.sh
@@ -65,7 +65,7 @@ setup_workdir() {
 
 cleanup() {
 	[[ -n $WORKDIR ]] && rm -rf "$WORKDIR"
-	[[ $1 ]] && exit $1
+	exit ${1:-0}
 }
 
 abort() {
-- 
GitLab