made some minor adjustments
This commit is contained in:
@@ -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()")
|
||||
|
||||
Reference in New Issue
Block a user