From 4595d2a3027c82fb04629a5e949a8a12bb2483a5 Mon Sep 17 00:00:00 2001 From: Chris Routh Date: Thu, 6 Nov 2025 09:36:47 -0800 Subject: [PATCH] Issue #499 - Only register cleanup if neither build or keep arguments have been passed. --- src/zimit/zimit.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/zimit/zimit.py b/src/zimit/zimit.py index 30c5de0..9ed8a20 100755 --- a/src/zimit/zimit.py +++ b/src/zimit/zimit.py @@ -856,7 +856,8 @@ def run(raw_args): logger.info("Exiting, invalid warc2zim params") return EXIT_CODE_WARC2ZIM_CHECK_FAILED - if not known_args.keep: + # only trigger cleanup when the keep argument is passed without a custom build dir. + if not known_args.build and not known_args.keep: atexit.register(cleanup) # copy / download custom behaviors to one single folder and configure crawler