Skip to content

Commit 76c7208

Browse files
committed
fix: don't open the browser if a base_path is set
1 parent 769a404 commit 76c7208

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/main.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,10 @@ async fn main() -> color_eyre::Result<()> {
114114
.recover(rejections::handle_rejection)
115115
.with(cors);
116116

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

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

0 commit comments

Comments
 (0)