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

This commit is contained in:
Thomas Brandého 2024-04-05 22:44:03 +02:00 committed by GitHub
parent 43dff5397c
commit 11a64e04d5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 1 deletions

View File

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

View File

@ -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)