INNER CODE UNIT · Python

run_capture

ExplosionEngine/Explosion · ThirdParty/ConanRecipes/build_recipes.py:129

def run_capture(cmd: list[str], cwd: Path | None = None) -> tuple[int, str]:
    print(f"\n$ {' '.join(cmd)}", flush=True)
    proc = subprocess.run(cmd, cwd=str(cwd) if cwd else None, stdout=subprocess.PIPE, text=True)
    return proc.returncode, proc.stdout


def graph_recipe_node(graph_json: str, reference: str) -> dict | None:
    try:
        nodes = json.loads(graph_json).get("graph", {}).get("nodes", {})
    except (json.JSONDecodeError, AttributeError):
        return None
    for node in nodes.values():
        if (node.get("ref") or "").split("#", 1)[0] == reference:
            return node
    return None


def list_has_binary(list_json: str, reference: str, package_id: str) -> bool:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…