debugger: Clear dap status indicator when dap update/download is complete (#28913)
Release Notes: - N/A
This commit is contained in:
parent
70b3cb04bb
commit
19f542b8d6
1 changed files with 16 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
||||||
use ::fs::Fs;
|
use ::fs::Fs;
|
||||||
use anyhow::{Context as _, Ok, Result, anyhow};
|
use anyhow::{Context as _, Result, anyhow};
|
||||||
use async_compression::futures::bufread::GzipDecoder;
|
use async_compression::futures::bufread::GzipDecoder;
|
||||||
use async_tar::Archive;
|
use async_tar::Archive;
|
||||||
use async_trait::async_trait;
|
use async_trait::async_trait;
|
||||||
|
@ -256,7 +256,21 @@ pub trait DebugAdapter: 'static + Send + Sync {
|
||||||
self.name()
|
self.name()
|
||||||
);
|
);
|
||||||
delegate.update_status(self.name(), DapStatus::Downloading);
|
delegate.update_status(self.name(), DapStatus::Downloading);
|
||||||
self.install_binary(version, delegate).await?;
|
match self.install_binary(version, delegate).await {
|
||||||
|
Ok(_) => {
|
||||||
|
delegate.update_status(self.name(), DapStatus::None);
|
||||||
|
}
|
||||||
|
Err(error) => {
|
||||||
|
delegate.update_status(
|
||||||
|
self.name(),
|
||||||
|
DapStatus::Failed {
|
||||||
|
error: error.to_string(),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
|
return Err(error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
delegate
|
delegate
|
||||||
.updated_adapters()
|
.updated_adapters()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue