From 013496862f4d4b441ab61255242b838b24287607 Mon Sep 17 00:00:00 2001 From: Simon Willison Date: Thu, 15 Dec 2022 16:55:17 -0800 Subject: [PATCH] Try click.echo() instead This ensures the URL is output correctly when running under Docker. Closes #1958 --- datasette/cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/datasette/cli.py b/datasette/cli.py index b3ae643a..d197925b 100644 --- a/datasette/cli.py +++ b/datasette/cli.py @@ -618,7 +618,7 @@ def serve( url = "http://{}:{}{}?token={}".format( host, port, ds.urls.path("-/auth-token"), ds._root_token ) - print(url) + click.echo(url) if open_browser: if url is None: # Figure out most convenient URL - to table, database or homepage