Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 2bf73e8

Browse filesBrowse files
committed
feat(sync): vcspull sync with no args shows help
1 parent e4476ea commit 2bf73e8
Copy full SHA for 2bf73e8

File tree

Expand file treeCollapse file tree

1 file changed

+4
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-2
lines changed

‎src/vcspull/cli/sync.py

Copy file name to clipboardExpand all lines: src/vcspull/cli/sync.py
+4-2Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ def clamp(n, _min, _max):
6464

6565

6666
@click.command(name="sync")
67+
@click.pass_context
6768
@click.argument(
6869
"repo_terms", type=click.STRING, nargs=-1, shell_complete=get_repo_completions
6970
)
@@ -83,7 +84,7 @@ def clamp(n, _min, _max):
8384
default=False,
8485
help="Exit immediately when encountering an error syncing multiple repos",
8586
)
86-
def sync(repo_terms, config, exit_on_error: bool) -> None:
87+
def sync(ctx, repo_terms, config, exit_on_error: bool) -> None:
8788
if config:
8889
configs = load_configs([config])
8990
else:
@@ -108,7 +109,8 @@ def sync(repo_terms, config, exit_on_error: bool) -> None:
108109
filter_repos(configs, dir=dir, vcs_url=vcs_url, name=name)
109110
)
110111
else:
111-
found_repos = configs
112+
click.echo(ctx.get_help(), color=ctx.color)
113+
ctx.exit()
112114

113115
for repo in found_repos:
114116
try:

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.