MCPcopy Create free account
hub / github.com/FastLED/FastLED / run_subprocess_safe

Function run_subprocess_safe

ci/docker_utils/qemu_esp32_docker.py:107–114  ·  view source on GitHub ↗

Run subprocess with safe UTF-8 handling and error replacement.

(
    cmd: list[str], **kwargs: Any
)

Source from the content-addressed store, hash-verified

105
106
107def run_subprocess_safe(
108 cmd: list[str], **kwargs: Any
109) -> subprocess.CompletedProcess[str]:
110 """Run subprocess with safe UTF-8 handling and error replacement."""
111 kwargs.setdefault("encoding", "utf-8")
112 kwargs.setdefault("errors", "replace")
113 kwargs.setdefault("env", get_docker_env())
114 return subprocess.run(cmd, **kwargs) # type: ignore[return-value]
115
116
117def run_docker_command_streaming(cmd: list[str]) -> int:

Callers

nothing calls this directly

Calls 2

get_docker_envFunction · 0.85
runMethod · 0.45

Tested by

no test coverage detected