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:
1 parent
77d6c87aa0
commit
a42b730688
1 file changed
+1
-1
@@ -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