MCPcopy Create free account
hub / github.com/JaredStewart/coderlm / clean_platform

Function clean_platform

plugin/generate.py:180–196  ·  view source on GitHub ↗
(platform: Platform, project_root: Path, dry_run: bool)

Source from the content-addressed store, hash-verified

178
179
180def clean_platform(platform: Platform, project_root: Path, dry_run: bool) -> None:
181 instruction_file = project_root / platform.instruction_path
182 cli_dest = project_root / platform.cli_path
183 cli_dir = cli_dest.parent
184 state_dir = project_root / platform.state_dir
185
186 if platform.format == "append":
187 _remove_markers(instruction_file, dry_run)
188 else:
189 _remove_file(instruction_file, dry_run)
190
191 _remove_file(cli_dest, dry_run)
192
193 # Remove state dir if empty
194 _remove_dir_if_empty(state_dir, dry_run)
195 # Remove CLI parent dir if empty
196 _remove_dir_if_empty(cli_dir, dry_run)
197
198
199# -- File operations --

Callers 1

mainFunction · 0.85

Calls 3

_remove_markersFunction · 0.85
_remove_fileFunction · 0.85
_remove_dir_if_emptyFunction · 0.85

Tested by

no test coverage detected