From a42b730688b3f7053d86c1393474d130e2abfa4d Mon Sep 17 00:00:00 2001 From: Cody D Dixon <130433943+CodeMasterCody3D@users.noreply.github.com> Date: Mon, 29 Jun 2026 15:43:10 -0500 Subject: [PATCH] fix: catch FileNotFoundError in get_current_branch when component dir is missing (#813) Error when opening KIUAH fix get_current_branch only catches CalledProcessError, not FileNotFoundError. When crowsnest isn't installed, the missing dir propagates the exception. Fix --- kiauh/utils/git_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kiauh/utils/git_utils.py b/kiauh/utils/git_utils.py index eb6e9a0..ead448a 100644 --- a/kiauh/utils/git_utils.py +++ b/kiauh/utils/git_utils.py @@ -109,7 +109,7 @@ def get_current_branch(repo: Path) -> str | None: ) return result.strip() if result else None - except CalledProcessError: + except (CalledProcessError, FileNotFoundError): return None