From 611a898ada157b9d5cb9b5081b96b12405581da5 Mon Sep 17 00:00:00 2001 From: Bruno Postle Date: Fri, 30 Jan 2026 20:07:04 +0000 Subject: [PATCH] IFC Git close and reopen repo after cloning Apparently on Windows clone can leave 'stale processes' --- src/bonsai/bonsai/tool/ifcgit.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/bonsai/bonsai/tool/ifcgit.py b/src/bonsai/bonsai/tool/ifcgit.py index 6854b38432..db557542bc 100644 --- a/src/bonsai/bonsai/tool/ifcgit.py +++ b/src/bonsai/bonsai/tool/ifcgit.py @@ -64,10 +64,13 @@ class IfcGit: @classmethod def clone_repo(cls, remote_url: str, local_folder: str) -> git.Repo: - IfcGitRepo.repo = git.Repo.clone_from( + repo = git.Repo.clone_from( url=remote_url, to_path=local_folder, ) + # Close the repo to release stale subprocess + repo.close() + IfcGitRepo.repo = git.Repo(local_folder) cls.config_info_attributes(IfcGitRepo.repo) return IfcGitRepo.repo