mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-07 15:18:29 +00:00
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.
20 lines
566 B
Python
20 lines
566 B
Python
import subprocess
|
|
|
|
import click
|
|
|
|
|
|
def install_crew(proxy_options: list[str]) -> None:
|
|
"""
|
|
Install the crew by running the UV command to lock and install.
|
|
"""
|
|
try:
|
|
command = ["uv", "sync"] + proxy_options
|
|
subprocess.run(command, check=True, capture_output=False, text=True)
|
|
|
|
except subprocess.CalledProcessError as e:
|
|
click.echo(f"An error occurred while running the crew: {e}", err=True)
|
|
click.echo(e.output, err=True)
|
|
|
|
except Exception as e:
|
|
click.echo(f"An unexpected error occurred: {e}", err=True)
|