File tree Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -125,6 +125,7 @@ pub enum Progress {
125
125
DidCheckCrate ( String ) ,
126
126
DidFinish ( io:: Result < ( ) > ) ,
127
127
DidCancel ,
128
+ DidFailToRestart ( String ) ,
128
129
}
129
130
130
131
enum Restart {
@@ -193,10 +194,11 @@ impl FlycheckActor {
193
194
self . progress ( Progress :: DidStart ) ;
194
195
}
195
196
Err ( error) => {
196
- tracing:: error!(
197
- command = ?self . check_command( ) ,
198
- %error, "failed to restart flycheck"
199
- ) ;
197
+ self . progress ( Progress :: DidFailToRestart ( format ! (
198
+ "Failed to run the following command: {:?} error={}" ,
199
+ self . check_command( ) ,
200
+ error
201
+ ) ) ) ;
200
202
}
201
203
}
202
204
}
Original file line number Diff line number Diff line change @@ -529,6 +529,13 @@ impl GlobalState {
529
529
}
530
530
flycheck:: Progress :: DidCheckCrate ( target) => ( Progress :: Report , Some ( target) ) ,
531
531
flycheck:: Progress :: DidCancel => ( Progress :: End , None ) ,
532
+ flycheck:: Progress :: DidFailToRestart ( err) => {
533
+ self . show_and_log_error (
534
+ "cargo check failed" . to_string ( ) ,
535
+ Some ( err. to_string ( ) ) ,
536
+ ) ;
537
+ return ;
538
+ }
532
539
flycheck:: Progress :: DidFinish ( result) => {
533
540
if let Err ( err) = result {
534
541
self . show_and_log_error (
You can’t perform that action at this time.
0 commit comments