From 5980cb3ef22221b1f20c20a2e8928ef297f01668 Mon Sep 17 00:00:00 2001 From: Min RK Date: Fri, 24 Mar 2023 11:58:32 +0100 Subject: [PATCH] log commands before they start (at debug level) so you know what you're waiting for --- tljh/utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tljh/utils.py b/tljh/utils.py index d4bf127..8ab1ca8 100644 --- a/tljh/utils.py +++ b/tljh/utils.py @@ -25,10 +25,11 @@ def run_subprocess(cmd, *args, **kwargs): and failed output directly to the user's screen """ logger = logging.getLogger("tljh") + printable_command = " ".join(cmd) + logger.debug("Running %s", printable_command) proc = subprocess.run( cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, *args, **kwargs ) - printable_command = " ".join(cmd) if proc.returncode != 0: # Our process failed! Show output to the user logger.error(