From 246eeaa2169dd7e0cf485b52a36f7ce64e72a80e Mon Sep 17 00:00:00 2001
From: merakor <cem@ckyln.com>
Date: Sun, 20 Dec 2020 09:00:28 +0000
Subject: cpt-lib: fix a bug in pkg_clean when CPT_DEBUG was set

Because of the CPT_DEBUG check returning 1, it would skip the termination,
meaning that even the package has failed, it will create the tarball and exit
with success.

FossilOrigin-Name: ce2337ddaa89f4a9928018ad325e6c7eac71ffb639ad55ad8e8bc97547f9a59b
---
 src/cpt-lib | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'src')

diff --git a/src/cpt-lib b/src/cpt-lib
index e071206..c75fbcf 100644
--- a/src/cpt-lib
+++ b/src/cpt-lib
@@ -8,7 +8,7 @@
 # Currently maintained by Cem Keylan.
 
 version() {
-    log "Carbs Packaging Tools" 5.1.0
+    log "Carbs Packaging Tools" 5.1.1
     exit 0
 }
 
@@ -1746,7 +1746,7 @@ pkg_updates(){
 pkg_clean() {
     # Clean up on exit or error. This removes everything related
     # to the build.
-    [ "$CPT_DEBUG" != 1 ] || return
+    [ "$CPT_DEBUG" != 1 ] || return 0
 
     # Block 'Ctrl+C' while cache is being cleaned.
     trap_set block
-- 
cgit v1.2.3