fix(docker): ignore a non-string host root when translating a mounted path

A MagicMock env attribute is not a workspace. Treating it as one crashed
the Windows search path on startswith.
This commit is contained in:
brooklyn!
2026-09-24 12:17:43 -05:00
parent 1a72042115
commit 37933ff662

View File

@@ -89,6 +89,8 @@ def translate_mounted_host_path(path: str, host_root: str, container_root: str)
drive-letter case do not matter; a sibling directory (``proj`` vs ``proj-other``)
is not a child.
"""
if not isinstance(path, str) or not isinstance(host_root, str) or not isinstance(container_root, str):
return None
if not path or not host_root or not container_root:
return None
key = _host_path_key(path)