(self, command: str)
| 448 | ) |
| 449 | |
| 450 | def execute(self, command: str) -> ShellCommandResult: |
| 451 | normalized_command = self._normalize_command(command) |
| 452 | if not normalized_command: |
| 453 | return ShellCommandResult(command=command, output="Empty command.", exit_code=0) |
| 454 | |
| 455 | if normalized_command in UNSUPPORTED_MESSAGES.values(): |
| 456 | return ShellCommandResult(command=command, output=normalized_command, exit_code=0) |
| 457 | |
| 458 | if self._uses_ssh(): |
| 459 | return self._execute_ssh(normalized_command) |
| 460 | return self._execute_local(normalized_command) |
| 461 | |
| 462 | def execute_command(self, command: str) -> str: |
| 463 | return self.execute(command).output |
no test coverage detected