MCPcopy Create free account
hub / github.com/agentforce314/clawcodex / _try_extract_cd

Function _try_extract_cd

src/tool_system/tools/bash/bash_tool.py:188–198  ·  view source on GitHub ↗
(command: str)

Source from the content-addressed store, hash-verified

186
187
188def _try_extract_cd(command: str) -> Path | None:
189 stripped = command.strip()
190 if not stripped.startswith("cd "):
191 return None
192 try:
193 parts = shlex.split(stripped, posix=True)
194 except ValueError:
195 return None
196 if len(parts) >= 2 and parts[0] == "cd":
197 return Path(parts[1])
198 return None
199
200
201def _bash_check_permissions(

Callers 1

_bash_callFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected