MCPcopy Create free account
hub / github.com/OpenIPC/firmware / env

Function env

general/scripts/size_report.py:69–73  ·  view source on GitHub ↗
(name: str, *, required: bool = True, default: str | None = None)

Source from the content-addressed store, hash-verified

67
68
69def env(name: str, *, required: bool = True, default: str | None = None) -> str:
70 val = os.environ.get(name, default)
71 if required and not val:
72 sys.exit(f"size_report: missing required env var {name}")
73 return val or ""
74
75
76def find_image(images_dir: Path, base: str, soc_model: str) -> Path | None:

Callers 2

build_reportFunction · 0.70
mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected