Skip to content

Commit

Permalink
fix: don't open the browser if a base_path is set
Browse files Browse the repository at this point in the history
  • Loading branch information
frectonz committed Jun 27, 2024
1 parent 769a404 commit 76c7208
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,10 @@ async fn main() -> color_eyre::Result<()> {
.recover(rejections::handle_rejection)
.with(cors);

let res = open::that(format!("http://{}", args.address));
tracing::info!("tried to open in browser: {res:?}");
if args.base_path.is_none() {
let res = open::that(format!("http://{}", args.address));
tracing::info!("tried to open in browser: {res:?}");
}

let address = args.address.parse::<std::net::SocketAddr>()?;
warp::serve(routes).run(address).await;
Expand Down

0 comments on commit 76c7208

Please sign in to comment.