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 <git@frank.af>
This commit is contained in:
Franklyn Tackitt 2022-09-12 08:19:27 -07:00 committed by Eric Callahan
parent 4954cc74cd
commit 6131c7afc1
1 changed files with 1 additions and 1 deletions

View File

@ -562,7 +562,7 @@ class GitRepo:
async def update_repo_status(self) -> bool: async def update_repo_status(self) -> bool:
async with self.git_operation_lock: 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( logging.info(
f"Git Repo {self.alias}: path '{self.git_path}'" f"Git Repo {self.alias}: path '{self.git_path}'"
" is not a valid git repo") " is not a valid git repo")