🐛 fix --exit-code in scanner.py

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.
This commit is contained in:
Michael Pöhn
2025-05-01 11:04:09 +02:00
committed by Hans-Christoph Steiner
parent bc3d22f4b2
commit 8024876f53

View File

@@ -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()