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

Function _isolate_env

scripts/run_skill_smoke.py:68–83  ·  view source on GitHub ↗

Strip every env knob that would inject non-fixture skill dirs.

(tmp: Path)

Source from the content-addressed store, hash-verified

66
67
68def _isolate_env(tmp: Path) -> None:
69 """Strip every env knob that would inject non-fixture skill dirs."""
70 fake_home = tmp / "home"
71 fake_home.mkdir()
72 os.environ["HOME"] = str(fake_home)
73 os.environ["CLAUDE_MANAGED_CONFIG_DIR"] = str(tmp / "managed")
74 for var in (
75 "CLAUDE_CONFIG_DIR",
76 "CLAWCODEX_SKILLS_DIR",
77 "CLAUDE_SKILLS_DIR",
78 "CLAWCODEX_MANAGED_SKILLS_DIR",
79 "CLAUDE_CODE_BARE_MODE",
80 "CLAUDE_CODE_DISABLE_POLICY_SKILLS",
81 "CLAUDE_CODE_ADDITIONAL_DIRECTORIES",
82 ):
83 os.environ.pop(var, None)
84
85
86def _print_section(title: str) -> None:

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected