From 6131c7afc1d9f26a0f612821870d42f29d512aac Mon Sep 17 00:00:00 2001 From: Franklyn Tackitt Date: Mon, 12 Sep 2022 08:19:27 -0700 Subject: [PATCH] Git submodules use a .git file instead of a directory I'm playing with using git submodules to track my entire printer config, and moonraker only works with separate clones as is. Using `.exists()` instead of `.is_dir()` allows moonraker to control the submodules. Signed-off-by: Franklyn Tackitt --- moonraker/components/update_manager/git_deploy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/moonraker/components/update_manager/git_deploy.py b/moonraker/components/update_manager/git_deploy.py index 5305d0b..c6960cc 100644 --- a/moonraker/components/update_manager/git_deploy.py +++ b/moonraker/components/update_manager/git_deploy.py @@ -562,7 +562,7 @@ class GitRepo: async def update_repo_status(self) -> bool: async with self.git_operation_lock: - if not self.git_path.joinpath(".git").is_dir(): + if not self.git_path.joinpath(".git").exists(): logging.info( f"Git Repo {self.alias}: path '{self.git_path}'" " is not a valid git repo")