tmuxp.workspace.builder.resolve_builder_paths
- tmuxp.workspace.builder.resolve_builder_paths ( session_config: dict[str, t
.Any ], workspace_file: str | os.Path [str] | None = None, ) list[pathlibLike .Path ] -
Resolve and validate trusted
workspace_builder_pathsimport roots.Description#
Each entry is shell-expanded (
~and$VARS), resolved relative to the workspace file's directory when not absolute, and required to be an existing directory. Returns[]when the key is absent, so existing workspaces add nothing tosys.path.Examples#
Absent key resolves to an empty list (no-op for existing workspaces):
>>> resolve_builder_paths({}, None)[]An existing directory is resolved:
>>> root = tmp_path / "roots">>> root.mkdir()>>> resolve_builder_paths({"workspace_builder_paths": [str(root)]}, None) == [... root.resolve()... ]TrueA missing directory is rejected:
>>> resolve_builder_paths(... {"workspace_builder_paths": [str(tmp_path / "missing")]}, None... )Traceback (most recent call last):...tmuxp.exc.WorkspaceBuilderPathError: ...- Parameters
-
-
session_config(dict[str, t.Any ]) # – the expanded workspace configuration -
workspace_file(str | os.Path [str] | None) # – path to the workspace file; its parent anchors relative entriesLike
-
- Returns
-
list of pathlib.Path