From 11a64e04d57c473f1d4cb8f5d87a1451135e391d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Brand=C3=A9ho?= Date: Fri, 5 Apr 2024 22:44:03 +0200 Subject: [PATCH] change to a nicer error message when `reflex run` fail (#3023) --- .pre-commit-config.yaml | 2 ++ reflex/utils/prerequisites.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index da6142dbc..560598e9e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,3 +1,5 @@ +fail_fast: true + repos: - repo: https://github.com/psf/black rev: 22.10.0 diff --git a/reflex/utils/prerequisites.py b/reflex/utils/prerequisites.py index ac445bf08..4622150f0 100644 --- a/reflex/utils/prerequisites.py +++ b/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)