Răsfoiți Sursa

change to a nicer error message when `reflex run` fail (#3023)

Thomas Brandého 1 an în urmă
părinte
comite
11a64e04d5
2 a modificat fișierele cu 3 adăugiri și 1 ștergeri
  1. 2 0
      .pre-commit-config.yaml
  2. 1 1
      reflex/utils/prerequisites.py

+ 2 - 0
.pre-commit-config.yaml

@@ -1,3 +1,5 @@
+fail_fast: true
+
 repos:
   - repo: https://github.com/psf/black
     rev: 22.10.0

+ 1 - 1
reflex/utils/prerequisites.py

@@ -852,7 +852,7 @@ def needs_reinit(frontend: bool = True) -> bool:
     """
     if not os.path.exists(constants.Config.FILE):
         console.error(
-            f"{constants.Config.FILE} not found. Run [bold]{constants.Reflex.MODULE_NAME} init[/bold] first."
+            f"[cyan]{constants.Config.FILE}[/cyan] not found. Move to the root folder of your project, or run [bold]{constants.Reflex.MODULE_NAME} init[/bold] to start a new project."
         )
         raise typer.Exit(1)