From 3e39a8a07ead8902bbc46cb776db32bac67b9193 Mon Sep 17 00:00:00 2001 From: Ondřej Nosek Date: Feb 17 2025 14:35:25 +0000 Subject: `pre-push-check`: show spectool command output When the spectool command fails, rpkg should display its output. JIRA: RHELCMP-14392 Fixes: #732 Signed-off-by: Ondřej Nosek --- diff --git a/pyrpkg/__init__.py b/pyrpkg/__init__.py index 20e567d..e14a63e 100644 --- a/pyrpkg/__init__.py +++ b/pyrpkg/__init__.py @@ -4576,9 +4576,11 @@ class Commands(object): self.log.warning('The pre-push script can\'t check private branches. ' 'Push operation continues.') return - ret, stdout, _ = self._run_command(cmd, cwd=clone_dir, - return_text=True, return_stdout=True) + ret, stdout, stderr = self._run_command(cmd, cwd=clone_dir, return_text=True, + return_stdout=True, return_stderr=True) if ret != 0: + self.log.info(stdout) + self.log.error(stderr) self.log.error('Command \'{0}\' failed. Push operation ' 'was cancelled.'.format(' '.join(cmd))) self.log.warning(show_hint)