diff --git a/revup/upload.py b/revup/upload.py index 0175b7d..d963f31 100644 --- a/revup/upload.py +++ b/revup/upload.py @@ -1,5 +1,6 @@ import argparse import enum +import logging import os import shlex import subprocess @@ -31,6 +32,7 @@ def run_pre_upload(pre_upload: str, ref_args: List[str], repo_root: str) -> None if os.path.isfile(in_repo_root): command[0] = in_repo_root + logging.debug("Running pre-upload command: {}".format(" ".join(command))) try: result = subprocess.run( command, @@ -42,6 +44,8 @@ def run_pre_upload(pre_upload: str, ref_args: List[str], repo_root: str) -> None ) except OSError as exc: raise RevupShellException(f"Couldn't run pre-upload command: {exc}") from exc + if result.stdout: + logging.debug("Pre-upload output:\n{}".format(result.stdout.rstrip())) if result.returncode != 0: raise RevupShellException( f"Pre-upload command failed:\n{result.stdout}\n"