Merge pull request #1837 from ehuss/serve-info

Always show the "serving on" info for `mdbook serve`.
This commit is contained in:
Eric Huss 2022-07-01 14:54:04 -07:00 committed by GitHub
commit eb82ddca0b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

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