made some minor adjustments

This commit is contained in:
2025-09-28 09:25:08 +02:00
parent a26367c0aa
commit 09563a997c
3 changed files with 12 additions and 13 deletions

View File

@@ -29,12 +29,15 @@ def execute_as_subprocess(command, base_path, verbosity=False):
"""executes the string given with the '-c, --command' flag."""
logger.debug("Entered execute_as_subprocess()")
logger.debug(f"Path:\t{base_path}\nCommand:\t{command}")
logger.debug(f"Path:\t{base_path}\nCommand:\t\t\t{command}")
# Decicion if the terminal output is verbose or not
if verbosity:
# Verbose output
logger.info("Running subprocess with terminal output.")
subprocess.run(command, cwd=base_path, shell=True)
else:
# Suppressed output
logger.info("Running with suppressed stdout and stderr")
subprocess.run(
command,
@@ -43,5 +46,4 @@ def execute_as_subprocess(command, base_path, verbosity=False):
stdout=subprocess.DEVNULL,
stderr=subprocess.STDOUT,
)
logger.debug("Exited execute_as_subprocess()")