12 lines
300 B
Python
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
|