mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-09 08:08:32 +00:00
feat: add validation for poetry migration
This commit is contained in:
@@ -8,20 +8,17 @@ def run_crew() -> None:
|
|||||||
Run the crew by running a command in the UV environment.
|
Run the crew by running a command in the UV environment.
|
||||||
"""
|
"""
|
||||||
command = ["uv", "run", "run_crew"]
|
command = ["uv", "run", "run_crew"]
|
||||||
|
|
||||||
try:
|
try:
|
||||||
result = subprocess.run(command, capture_output=False, text=True, check=True)
|
subprocess.run(command, capture_output=True, text=True, check=True)
|
||||||
|
|
||||||
if result.stderr:
|
|
||||||
click.echo(result.stderr, err=True)
|
|
||||||
|
|
||||||
except subprocess.CalledProcessError as e:
|
except subprocess.CalledProcessError as e:
|
||||||
click.echo(f"An error occurred while running the crew: {e}", err=True)
|
click.echo(f"An error occurred while running the crew: {e}", err=True)
|
||||||
click.echo(e.output, err=True, nl=True)
|
click.echo(e.output, err=True, nl=True)
|
||||||
click.secho(
|
if "table found" in e.stderr:
|
||||||
"It's possible that you are using an old version of crewAI that uses poetry, please run `crewai update` to update your pyproject.toml to use uv.",
|
click.secho(
|
||||||
fg="yellow",
|
"It's possible that you are using an old version of crewAI that uses poetry, please run `crewai update` to update your pyproject.toml to use uv.",
|
||||||
)
|
fg="yellow",
|
||||||
|
)
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
click.echo(f"An unexpected error occurred: {e}", err=True)
|
click.echo(f"An unexpected error occurred: {e}", err=True)
|
||||||
|
|||||||
Reference in New Issue
Block a user