From 08ff13802e585ee8ce6d4e6b6da5815182aa7b58 Mon Sep 17 00:00:00 2001 From: Dennis Fink Date: Tue, 29 Sep 2026 14:18:50 +0200 Subject: fix(commands): do not fail on silent nonzero exits Only abort command execution when a non-accepted exit code is accompanied by stderr output. Allow silent nonzero exits to return normally so package queries that use them to indicate an empty result are not incorrectly treated as failures. --- prometheus_pacman_exporter/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'prometheus_pacman_exporter/__init__.py') diff --git a/prometheus_pacman_exporter/__init__.py b/prometheus_pacman_exporter/__init__.py index 6543f2f..e957662 100644 --- a/prometheus_pacman_exporter/__init__.py +++ b/prometheus_pacman_exporter/__init__.py @@ -166,7 +166,7 @@ def run_command( error(f"Command ({command_string}) failed with exit code:", str(result.returncode)) if result.stderr: error("stderr:", result.stderr.strip()) - ctx.exit(1) + ctx.exit(1) return result -- cgit v1.3.1