diff --git a/deploy/ssh/deploy-remote.py b/deploy/ssh/deploy-remote.py index 1c4f1ba..b90a464 100644 --- a/deploy/ssh/deploy-remote.py +++ b/deploy/ssh/deploy-remote.py @@ -83,26 +83,28 @@ class SSHDeployer: print(f"❌ SSH connection failed: {e}") return False - def execute_remote(self, command: str, description: str = "") -> bool: + def execute_remote(self, command: str, description: str = "", silent: bool = False) -> bool: """Execute command on remote server""" try: - if description: + if description and not silent: print(f"🔧 {description}") stdin, stdout, stderr = self.ssh_client.exec_command(command) exit_status = stdout.channel.recv_exit_status() if exit_status == 0: - if description: + if description and not silent: print(f" ✅ {description} completed") return True else: error_output = stderr.read().decode() - print(f" ❌ {description} failed: {error_output}") + if not silent: + print(f" ❌ {description} failed: {error_output}") return False except Exception as e: - print(f" ❌ {description} failed: {e}") + if not silent: + print(f" ❌ {description} failed: {e}") return False def transfer_file(self, local_path: str, remote_path: str, description: str = "") -> bool: