Files
chinook/chinook/remote/_exists.py
2026-03-21 09:58:39 -05:00

12 lines
300 B
Python

from ..shell import execute
def exists(addr: str) -> bool:
repo_exists = True
command_str = "git ls-remote --exit-code -h {}"
def _handle_error(error: Exception) -> None:
nonlocal repo_exists
repo_exists = False
execute(command_str.format(addr), _handle_error)
return repo_exists