Skip to content

Commit

Permalink
!squash more
Browse files Browse the repository at this point in the history
  • Loading branch information
tony committed Aug 20, 2023
1 parent f107b33 commit 4d79f1b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/libvcs/_internal/shortcuts.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,9 @@ def create_project(
vcs_matches = url_tools.registry.match(url=url, is_explicit=True)

if len(vcs_matches) == 0:
raise LibVCSException(f"No vcs found for {url}")
raise VCSNoMatchFoundForUrl(url=url)
if len(vcs_matches) > 1:
raise LibVCSException(f"No exact matches for {url}")
raise VCSMultipleMatchFoundForUrl(url=url)

assert vcs_matches[0].vcs is not None

Expand All @@ -117,7 +117,7 @@ def is_vcs(val: t.Any) -> "TypeGuard[VCSLiteral]":
if is_vcs(vcs_matches[0].vcs):
vcs = vcs_matches[0].vcs
else:
raise InvalidVCS(f"{url} does not have supported vcs: {vcs}")
raise VCSNotSupported(url=url, vcs=vcs_matches[0].vcs)

if vcs == "git":
return GitSync(url=url, dir=dir, progress_callback=progress_callback, **kwargs)
Expand Down

0 comments on commit 4d79f1b

Please sign in to comment.