From 1d2b720ebe0761628421cddd77ae57ee3a234d66 Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Fri, 1 Jul 2022 14:36:18 -0700 Subject: [PATCH] Always show the "serving on" info for `mdbook serve`. --- src/cmd/serve.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/cmd/serve.rs b/src/cmd/serve.rs index 97ef3955..bafbfd52 100644 --- a/src/cmd/serve.rs +++ b/src/cmd/serve.rs @@ -102,9 +102,10 @@ pub fn execute(args: &ArgMatches) -> Result<()> { serve(build_dir, sockaddr, reload_tx, &file_404); }); + let serving_url = format!("http://{}", address); + info!("Serving on: {}", serving_url); + if open_browser { - let serving_url = format!("http://{}", address); - info!("Serving on: {}", serving_url); open(serving_url); }