Forward install command options to uv sync (#1510)

Allow passing additional options from `crewai install` directly to
`uv sync`. This enables commands like `crewai install --locked` to work
as expected by forwarding all flags and options to the underlying uv
command.
This commit is contained in:
Vini Brasil
2024-10-25 11:20:41 -03:00
committed by GitHub
parent 4589d6fe9d
commit f29f4abdd7
2 changed files with 10 additions and 5 deletions

View File

@@ -178,10 +178,14 @@ def test(n_iterations: int, model: str):
evaluate_crew(n_iterations, model)
@crewai.command()
def install():
@crewai.command(context_settings=dict(
ignore_unknown_options=True,
allow_extra_args=True,
))
@click.pass_context
def install(context):
"""Install the Crew."""
install_crew()
install_crew(context.args)
@crewai.command()