Skip to content

Commit df8f49f

Browse files
committed
feat(sync): Show output repo term not found in config
1 parent 72bea24 commit df8f49f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/vcspull/cli/sync.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ def clamp(n, _min, _max):
6060

6161

6262
EXIT_ON_ERROR_MSG = "Exiting via error (--exit-on-error passed)"
63+
NO_REPOS_FOR_TERM_MSG = 'No repo found in config(s) for "{name}"'
6364

6465

6566
@click.command(name="sync")
@@ -100,6 +101,9 @@ def sync(repo_terms, config, exit_on_error: bool) -> None:
100101
name = repo_term
101102

102103
# collect the repos from the config files
104+
found = filter_repos(configs, dir=dir, vcs_url=vcs_url, name=name)
105+
if len(found) == 0:
106+
click.echo(NO_REPOS_FOR_TERM_MSG.format(name=name))
103107
found_repos.extend(
104108
filter_repos(configs, dir=dir, vcs_url=vcs_url, name=name)
105109
)

0 commit comments

Comments
 (0)