From 8024876f53bb1fe64b23eb8724dd80ea2fc2bcc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20P=C3=B6hn?= Date: Thu, 1 May 2025 11:04:09 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix=20--exit-code=20in=20scanner?= =?UTF-8?q?.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There's a code path in scanner.py where scanner --exit-code can find problems but will not terminate with an error code. So here's a fix for that. --- fdroidserver/scanner.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fdroidserver/scanner.py b/fdroidserver/scanner.py index d34c0277..5380dfda 100644 --- a/fdroidserver/scanner.py +++ b/fdroidserver/scanner.py @@ -1334,6 +1334,9 @@ def main(): elif probcount or options.verbose: print(_("%d problems found") % probcount) + if options.exit_code and probcount > 0: + sys.exit(ExitCode.NONFREE_CODE) + if __name__ == "__main__": main()