MCPcopy Create free account
hub / github.com/bigdra50/unity-cli / __init__

Method __init__

unity_cli/hub/hub_cli.py:25–39  ·  view source on GitHub ↗

Initialize with optional custom Hub path. Args: hub_path: Custom path to Hub CLI. If None, auto-detect. Raises: HubNotFoundError: If Hub CLI cannot be found.

(self, hub_path: Path | None = None)

Source from the content-addressed store, hash-verified

23 """Unity Hub CLI wrapper."""
24
25 def __init__(self, hub_path: Path | None = None) -> None:
26 """Initialize with optional custom Hub path.
27
28 Args:
29 hub_path: Custom path to Hub CLI. If None, auto-detect.
30
31 Raises:
32 HubNotFoundError: If Hub CLI cannot be found.
33 """
34 self._hub_path = hub_path or locate_hub_cli()
35 if self._hub_path is None:
36 raise HubNotFoundError(
37 "Unity Hub CLI not found. Install Unity Hub or set UNITY_HUB_PATH.",
38 code="HUB_NOT_FOUND",
39 )
40
41 def _run_command(
42 self,

Callers

nothing calls this directly

Calls 2

locate_hub_cliFunction · 0.90
HubNotFoundErrorClass · 0.90

Tested by

no test coverage detected