diff --git a/packages/testing/src/execution_testing/cli/pytest_commands/fill.py b/packages/testing/src/execution_testing/cli/pytest_commands/fill.py index 5d58519411..0e65d16ea4 100644 --- a/packages/testing/src/execution_testing/cli/pytest_commands/fill.py +++ b/packages/testing/src/execution_testing/cli/pytest_commands/fill.py @@ -291,10 +291,15 @@ def fill(pytest_args: List[str], **kwargs: Any) -> None: """Entry point for the fill command.""" del kwargs + if not pytest_args: + ctx = click.get_current_context() + click.echo("Error: The 'fill' command requires a target file or directory.", err=True) + click.echo(ctx.get_help()) + ctx.exit(1) + command = FillCommand() command.execute(list(pytest_args)) - @click.command( context_settings={ "ignore_unknown_options": True,