mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-10 00:28:31 +00:00
- Fix RUF005: Use spread syntax instead of concatenation in install_crew.py - Fix S108: Replace /tmp with /home/test in test paths - Fix E501: Shorten function name to meet line length requirements These changes address the lint failures in CI while maintaining the core Windows subprocess compatibility fix. Co-Authored-By: João <joao@crewai.com>
26 lines
848 B
Python
26 lines
848 B
Python
import subprocess
|
|
|
|
import click
|
|
|
|
from crewai.cli.subprocess_utils import run_command
|
|
|
|
|
|
# Be mindful about changing this.
|
|
# on some environments we don't use this command but instead uv sync directly
|
|
# so if you expect this to support more things you will need to replicate it there
|
|
# ask @joaomdmoura if you are unsure
|
|
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]
|
|
run_command(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)
|