We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8ec159c commit 50493b4Copy full SHA for 50493b4
src/serve/mod.rs
@@ -88,7 +88,7 @@ impl ServeSystem {
88
#[tracing::instrument(level = "trace", skip(self))]
89
pub async fn run(mut self) -> Result<()> {
90
// Spawn the watcher & the server.
91
- let _build_res = self.watch.build().await; // TODO: only open after a successful build.
+ let build_res = self.watch.build().await;
92
let watch_handle = tokio::spawn(self.watch.run());
93
let server_handle = Self::spawn_server(
94
self.cfg.clone(),
@@ -98,7 +98,7 @@ impl ServeSystem {
98
.await?;
99
100
// Open the browser.
101
- if self.cfg.open {
+ if self.cfg.open && build_res.is_ok() {
102
if let Err(err) = open::that(self.open_http_addr) {
103
tracing::error!(error = ?err, "error opening browser");
104
}
0 commit comments