Skip to content

Commit

Permalink
Always open index page with serve --open
Browse files Browse the repository at this point in the history
  • Loading branch information
ISSOtm committed Jun 22, 2022
1 parent 2f5e89f commit 55e1d36
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/cmd/serve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,7 @@ pub fn execute(args: &ArgMatches) -> Result<()> {
});

if open_browser {
let serving_url = match first_chapter(&book).map(|path| path.with_extension("html")) {
Some(path) => format!("http://{}/{}", address, path.display()),
_ => format!("http://{}", address),
};
let serving_url = format!("http://{}", address);
info!("Serving on: {}", serving_url);
open(serving_url);
}
Expand Down

0 comments on commit 55e1d36

Please sign in to comment.