@@ -193,7 +193,10 @@ where
193193
194194 // Wait for app to complete or SIGTERM
195195 let status_result = tokio:: select! {
196- status = status_task => status. unwrap( ) ,
196+ status = status_task => {
197+ debug!( "Status task completed, result: {:?}" , status) ;
198+ status. unwrap( )
199+ } ,
197200 _ = tokio:: signal:: ctrl_c( ) , if !output:: get_output_mode( ) . is_mcp( ) => {
198201 output:: write( "\n Received Ctrl+C, stopping local run...\n " ) ;
199202 app. lock( ) . await . terminate( ) . await . ok( ) ;
@@ -205,8 +208,8 @@ where
205208 // And if we crashed, err out
206209 match status_result {
207210 Status :: Exited => output:: success ( "Your local run exited cleanly." ) ,
208- Status :: Crashed { .. } => {
209- output:: error ( "Your local run crashed!" ) ;
211+ Status :: Crashed { code } => {
212+ output:: error ( & format ! ( "Your local run crashed with exit code: {}" , code ) ) ;
210213 return Err ( Error :: AppCrashed ) ;
211214 }
212215 _ => {
@@ -611,20 +614,19 @@ async fn monitor_local_status(app: Arc<Mutex<LocalApp>>) -> Status {
611614 err_count = 0 ;
612615
613616 match status {
614- tower_runtime :: Status :: Exited => {
617+ Status :: Exited => {
615618 debug ! ( "Run exited cleanly, stopping status monitoring" ) ;
616619
617620 // We're done. Exit this loop and function.
618621 return status;
619622 }
620- tower_runtime :: Status :: Crashed { .. } => {
623+ Status :: Crashed { .. } => {
621624 debug ! ( "Run crashed, stopping status monitoring" ) ;
622625
623626 // We're done. Exit this loop and function.
624627 return status;
625628 }
626629 _ => {
627- debug ! ( "App status: other, continuing to monitor" ) ;
628630 sleep ( Duration :: from_millis ( 100 ) ) . await ;
629631 }
630632 }
0 commit comments