MCPcopy Create free account
hub / github.com/QuantGeekDev/docker-mcp / execute

Method execute

src/docker_mcp/docker_executor.py:15–23  ·  view source on GitHub ↗
(self, cmd: str)

Source from the content-addressed store, hash-verified

13
14class WindowsExecutor:
15 async def execute(self, cmd: str) -> Tuple[int, str, str]:
16 process = await asyncio.create_subprocess_shell(
17 cmd,
18 stdout=asyncio.subprocess.PIPE,
19 stderr=asyncio.subprocess.PIPE,
20 shell=True
21 )
22 stdout, stderr = await process.communicate()
23 return process.returncode, stdout.decode(), stderr.decode()
24
25
26class UnixExecutor:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected