File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ impl ServeSystem {
88
88
#[ tracing:: instrument( level = "trace" , skip( self ) ) ]
89
89
pub async fn run ( mut self ) -> Result < ( ) > {
90
90
// Spawn the watcher & the server.
91
- let _build_res = self . watch . build ( ) . await ; // TODO: only open after a successful build.
91
+ let build_res = self . watch . build ( ) . await ;
92
92
let watch_handle = tokio:: spawn ( self . watch . run ( ) ) ;
93
93
let server_handle = Self :: spawn_server (
94
94
self . cfg . clone ( ) ,
@@ -98,7 +98,7 @@ impl ServeSystem {
98
98
. await ?;
99
99
100
100
// Open the browser.
101
- if self . cfg . open {
101
+ if self . cfg . open && build_res . is_ok ( ) {
102
102
if let Err ( err) = open:: that ( self . open_http_addr ) {
103
103
tracing:: error!( error = ?err, "error opening browser" ) ;
104
104
}
You can’t perform that action at this time.
0 commit comments