MCPcopy Create free account
hub / github.com/Dizzy-K/AutoPT / execute

Method execute

tools/terminal.py:450–460  ·  view source on GitHub ↗
(self, command: str)

Source from the content-addressed store, hash-verified

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

Callers 2

execute_commandMethod · 0.95
handle_doctorFunction · 0.95

Calls 5

_normalize_commandMethod · 0.95
_uses_sshMethod · 0.95
_execute_sshMethod · 0.95
_execute_localMethod · 0.95
ShellCommandResultClass · 0.85

Tested by

no test coverage detected