@@ -225,7 +225,7 @@ pub fn command(options: Options) -> Result<()> {
225225 }
226226 }
227227
228- let mut process = start_app ( & options, & runner, & cargo_features, child_wait_rx. clone ( ) ) ;
228+ let mut process = start_app ( & options, & runner, & cargo_features, child_wait_rx. clone ( ) ) ? ;
229229
230230 let ( tx, rx) = channel ( ) ;
231231
@@ -268,7 +268,7 @@ pub fn command(options: Options) -> Result<()> {
268268 break ;
269269 }
270270 }
271- process = start_app ( & options, & runner, & cargo_features, child_wait_rx. clone ( ) ) ;
271+ process = start_app ( & options, & runner, & cargo_features, child_wait_rx. clone ( ) ) ? ;
272272 }
273273 }
274274 }
@@ -298,7 +298,7 @@ fn start_app(
298298 runner : & str ,
299299 features : & [ String ] ,
300300 child_wait_rx : Arc < Mutex < Receiver < ( ) > > > ,
301- ) -> Arc < SharedChild > {
301+ ) -> Result < Arc < SharedChild > > {
302302 let mut command = Command :: new ( runner) ;
303303 command. args ( & [ "run" , "--no-default-features" ] ) ;
304304
@@ -321,7 +321,7 @@ fn start_app(
321321 command. pipe ( ) . unwrap ( ) ;
322322
323323 let child =
324- SharedChild :: spawn ( & mut command) . unwrap_or_else ( |_| panic ! ( "failed to run {}" , runner) ) ;
324+ SharedChild :: spawn ( & mut command) . with_context ( || format ! ( "failed to run {}" , runner) ) ? ;
325325 let child_arc = Arc :: new ( child) ;
326326
327327 let child_clone = child_arc. clone ( ) ;
@@ -349,5 +349,5 @@ fn start_app(
349349 }
350350 } ) ;
351351
352- child_arc
352+ Ok ( child_arc)
353353}
0 commit comments