mirror of
https://github.com/dw-0/kiauh.git
synced 2026-06-30 12:25:26 +05:00
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
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user