Pop an error notification when flycheck can't be restarted

This commit is contained in:
Lukas Wirth 2022-08-22 17:42:33 +02:00
parent dea163970a
commit 2abb78d06d
2 changed files with 13 additions and 4 deletions

View file

@ -125,6 +125,7 @@ pub enum Progress {
DidCheckCrate(String),
DidFinish(io::Result<()>),
DidCancel,
DidFailToRestart(String),
}
enum Restart {
@ -193,10 +194,11 @@ impl FlycheckActor {
self.progress(Progress::DidStart);
}
Err(error) => {
tracing::error!(
command = ?self.check_command(),
%error, "failed to restart flycheck"
);
self.progress(Progress::DidFailToRestart(format!(
"Failed to run the following command: {:?} error={}",
self.check_command(),
error
)));
}
}
}