diff --git a/remi/utils.py b/remi/utils.py index 9c851fc4fe3340859dc1977522d4e5dc252dcf7d..1d5ae3b233732e20ebd3de595a810fa57d605dcc 100644 --- a/remi/utils.py +++ b/remi/utils.py @@ -9,6 +9,7 @@ from os.path import join from socket import gethostname from subprocess import Popen, DEVNULL from typing import Union +from termcolor import colored from .config import Config from .user_interaction import to_bold, print_info, print_error @@ -33,7 +34,7 @@ def run_local_cmd(command: list[str], running command. (if background) return_code (int): Else, the return code of the command. """ - print_info(to_bold('Running command locally: ') + ' '.join(command)) + print_info(to_bold('Running command locally: ') + colored(' '.join(command), 'blue')) if redirect_output: log_file: str = join(Config().output_path, 'log.txt') @@ -137,11 +138,12 @@ def run_remote_command(command: list[str], cmd += command - print_info(to_bold('Running command: `') + ' '.join(command) + '`') + print_info(to_bold('Running command: ') + + colored(' '.join(command), 'blue')) if pretty_hostname is None: pretty_hostname = hostname[-1] if isinstance(hostname, list) else hostname - print_info(to_bold('on remote host: ') + str(pretty_hostname)) + print_info(to_bold('on remote host: ') + colored(str(pretty_hostname), 'magenta')) if redirect_output: log_file: str = join(config.output_path, 'log.txt')