INNER CODE UNIT · Python
find_gen_sbom
wolfSSL/wolfBoot · tools/sbom/sbom-driver.py:100
def find_gen_sbom(explicit):
"""Locate gen-sbom: explicit arg, a sibling vendored copy, then WOLFSSL_DIR."""
if explicit:
return explicit
sibling = os.path.join(SCRIPT_DIR, "gen-sbom")
if os.path.isfile(sibling):
return sibling
wolfssl_dir = os.environ.get("WOLFSSL_DIR")
if wolfssl_dir:
cand = os.path.join(wolfssl_dir, "scripts", "gen-sbom")
if os.path.isfile(cand):
return cand
return sibling # report the sibling path in the error message
def gen_sbom_supports(python, gen_sbom, flag):
"""Return True if the generator advertises a flag in its --help."""
try: