MCPcopy Create free account
hub / github.com/Louisym/MiniCC / normalize_mounts

Function normalize_mounts

tutorials/14_bash_engine_deep_dive.py:209–218  ·  view source on GitHub ↗

将相对挂载路径转为绝对路径 — 源码 sandbox.rs:264-278

(mounts: List[str], cwd: Path)

Source from the content-addressed store, hash-verified

207
208
209def normalize_mounts(mounts: List[str], cwd: Path) -> List[str]:
210 """将相对挂载路径转为绝对路径 — 源码 sandbox.rs:264-278"""
211 result = []
212 for mount in mounts:
213 p = Path(mount)
214 if p.is_absolute():
215 result.append(str(p))
216 else:
217 result.append(str(cwd / p))
218 return result
219
220
221def resolve_sandbox_status(request: SandboxRequest, cwd: Path) -> SandboxStatus:

Callers 1

resolve_sandbox_statusFunction · 0.70

Calls 1

appendMethod · 0.80

Tested by

no test coverage detected