mirror of
https://github.com/dw-0/kiauh.git
synced 2025-12-14 02:54:28 +05:00
refactor: return - if branch cannot be read
Signed-off-by: Dominik Willner <th33xitus@gmail.com>
This commit is contained in:
@@ -104,10 +104,10 @@ def get_current_branch(repo: Path) -> str:
|
|||||||
result: str = check_output(cmd, stderr=DEVNULL, cwd=repo).decode(
|
result: str = check_output(cmd, stderr=DEVNULL, cwd=repo).decode(
|
||||||
encoding="utf-8"
|
encoding="utf-8"
|
||||||
)
|
)
|
||||||
return result.strip()
|
return result.strip() if result else "-"
|
||||||
|
|
||||||
except CalledProcessError:
|
except CalledProcessError:
|
||||||
return ""
|
return "-"
|
||||||
|
|
||||||
|
|
||||||
def get_local_tags(repo_path: Path, _filter: str | None = None) -> List[str]:
|
def get_local_tags(repo_path: Path, _filter: str | None = None) -> List[str]:
|
||||||
|
|||||||
Reference in New Issue
Block a user