tools: fail fast when NV_RS_RM_OBJECT names a missing path

This commit is contained in:
morebrackets
2026-12-02 06:39:45 -08:00
parent c12ff01c7c
commit 882803c613

View File

@ -24,10 +24,10 @@ def require(cond: bool, msg: str) -> None:
def discover_rm_object(explicit: str | None = None) -> Path:
if explicit:
return Path(explicit).expanduser().resolve()
candidates: list[Path] = []
env_obj = os.environ.get("NV_RS_RM_OBJECT")
if env_obj:
candidates.append(Path(env_obj).expanduser())
return Path(env_obj).expanduser().resolve()
candidates: list[Path] = []
env_kernel = os.environ.get("NV_RS_KERNEL_SRC")
if env_kernel:
candidates.append(Path(env_kernel).expanduser() / "nvidia/nv-kernel.o_binary")