Skip to content

Commit 09888b5

Browse files
component group fix (calling without a subcommand)
1 parent 654a7aa commit 09888b5

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

sdk/python/kfp/cli/component.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -357,9 +357,13 @@ def build_image(self, platform: str, push_image: bool):
357357
f'Built and pushed component container {self._target_image}')
358358

359359

360-
@click.group()
361-
def component():
360+
@click.group(invoke_without_command=True)
361+
@click.pass_context
362+
def component(ctx: click.Context):
362363
"""Builds shareable, containerized components."""
364+
if ctx.invoked_subcommand is None:
365+
click.echo(ctx.get_help())
366+
ctx.exit(0)
363367

364368

365369
@component.command()

0 commit comments

Comments
 (0)