Skip to content

Commit f49b6f2

Browse files
committed
cli to cleanup module_info_cache_path when reinstall
1 parent 747ffe7 commit f49b6f2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cli/homl_cli/main.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,10 @@ def install(insecure_socket: bool, upgrade: bool, gptoss: bool):
309309
homl_dir = config.CONFIG_DIR
310310
socket_dir = homl_dir / "run"
311311
model_dir = Path(model_home)
312+
module_info_cache_path = model_dir / "module_info_cache"
313+
if module_info_cache_path.exists():
314+
click.echo(f"Removing old module info cache at {module_info_cache_path}")
315+
shutil.rmtree(module_info_cache_path)
312316
compose_path = homl_dir / "docker-compose.yml"
313317
template_path = get_resource_path("docker-compose.yml.template")
314318
user_etc_path = homl_dir / "etc_pwd_tmp"

0 commit comments

Comments
 (0)