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

Function get_docker_env

ci/docker_utils/qemu_esp32_docker.py:91–104  ·  view source on GitHub ↗

Get environment for Docker commands, handling Git Bash/MSYS2 path conversion.

()

Source from the content-addressed store, hash-verified

89
90
91def get_docker_env() -> dict[str, str]:
92 """Get environment for Docker commands, handling Git Bash/MSYS2 path conversion."""
93 env = os.environ.copy()
94 # Set UTF-8 encoding environment variables for Windows
95 env["PYTHONIOENCODING"] = "utf-8"
96 env["PYTHONUTF8"] = "1"
97 # Only set MSYS_NO_PATHCONV if we're in a Git Bash/MSYS2 environment
98 if (
99 "MSYSTEM" in os.environ
100 or os.environ.get("TERM") == "xterm"
101 or "bash.exe" in os.environ.get("SHELL", "")
102 ):
103 env["MSYS_NO_PATHCONV"] = "1"
104 return env
105
106
107def run_subprocess_safe(

Callers 8

run_subprocess_safeFunction · 0.85
check_image_existsMethod · 0.85
build_board_imageMethod · 0.85
pull_imageMethod · 0.85

Calls 2

copyMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected