Skip to content

Commit 7e4e4c5

Browse files
authored
🐛 Use correct syntax for links (#131)
1 parent 2173760 commit 7e4e4c5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/fastapi_cli/cli.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def callback(
4545
4646
Manage your [bold]FastAPI[/bold] projects, run your FastAPI apps, and more.
4747
48-
Read more in the docs: [link]https://fastapi.tiangolo.com/fastapi-cli/[/link].
48+
Read more in the docs: [link=https://fastapi.tiangolo.com/fastapi-cli/]https://fastapi.tiangolo.com/fastapi-cli/[/link].
4949
"""
5050

5151

@@ -66,7 +66,9 @@ def _run(
6666
except FastAPICLIException as e:
6767
logger.error(str(e))
6868
raise typer.Exit(code=1) from None
69-
serving_str = f"[dim]Serving at:[/dim] [link]http://{host}:{port}[/link]\n\n[dim]API docs:[/dim] [link]http://{host}:{port}/docs[/link]"
69+
url = f"http://{host}:{port}"
70+
url_docs = f"{url}/docs"
71+
serving_str = f"[dim]Serving at:[/dim] [link={url}]{url}[/link]\n\n[dim]API docs:[/dim] [link={url_docs}]{url_docs}[/link]"
7072

7173
if command == "dev":
7274
panel = Panel(

0 commit comments

Comments
 (0)