sdk beta.6 (#2885)

beta.6
This commit is contained in:
Aiden McClelland
2025-04-22 12:00:34 -06:00
committed by GitHub
parent 113154702f
commit c85ea7d8fa
8 changed files with 45 additions and 38 deletions

View File

@@ -8,9 +8,10 @@ use rpc_toolkit::{
use crate::context::{CliContext, DiagnosticContext, RpcContext};
use crate::init::SYSTEM_REBUILD_PATH;
use crate::prelude::*;
use crate::shutdown::Shutdown;
use crate::util::io::delete_file;
use crate::{Error, DATA_DIR};
use crate::DATA_DIR;
pub fn diagnostic<C: Context>() -> ParentHandler<C> {
ParentHandler::new()
@@ -74,7 +75,8 @@ pub fn restart(ctx: DiagnosticContext) -> Result<(), Error> {
.map(|guid| (guid, Path::new(DATA_DIR).to_owned())),
restart: true,
})
.expect("receiver dropped");
.map_err(|_| eyre!("receiver dropped"))
.log_err();
Ok(())
}
pub async fn rebuild(ctx: DiagnosticContext) -> Result<(), Error> {

View File

@@ -91,8 +91,8 @@ pub async fn shutdown(ctx: RpcContext) -> Result<(), Error> {
export_args: Some((ctx.disk_guid.clone(), Path::new(DATA_DIR).to_owned())),
restart: false,
}))
.map_err(|_| ())
.expect("receiver dropped");
.map_err(|_| eyre!("receiver dropped"))
.log_err();
Ok(())
}
@@ -112,8 +112,8 @@ pub async fn restart(ctx: RpcContext) -> Result<(), Error> {
export_args: Some((ctx.disk_guid.clone(), Path::new(DATA_DIR).to_owned())),
restart: true,
}))
.map_err(|_| ())
.expect("receiver dropped");
.map_err(|_| eyre!("receiver dropped"))
.log_err();
Ok(())
}