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

Function detect_package_exception_in_output

ci/compiler/package_manager.py:134–148  ·  view source on GitHub ↗

Detect PackageException errors in PlatformIO output. Returns: Tuple of (has_error, package_url_or_name)

(output: str)

Source from the content-addressed store, hash-verified

132
133
134def detect_package_exception_in_output(output: str) -> tuple[bool, Optional[str]]:
135 """Detect PackageException errors in PlatformIO output.
136
137 Returns:
138 Tuple of (has_error, package_url_or_name)
139 """
140 if "PackageException" in output and "Could not install package" in output:
141 # Try to extract the package URL or name
142 match = re.search(
143 r"Could not install package\s*['\"]?([^'\"]+)['\"]?\s*for", output
144 )
145 if match:
146 return True, match.group(1)
147 return True, None
148 return False, None
149
150
151def aggressive_clean_pio_packages(paths: "FastLEDPaths", board_name: str) -> bool:

Callers 1

_build_internalMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected