mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 10:21:52 +00:00
no output for dependency and backup actions
This commit is contained in:
committed by
Aiden McClelland
parent
c4baacf44f
commit
19d1e905a2
@@ -1,8 +1,9 @@
|
||||
use anyhow::anyhow;
|
||||
use patch_db::HasModel;
|
||||
use regex::NoExpand;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::action::ActionImplementation;
|
||||
use crate::action::{ActionImplementation, NoOutput};
|
||||
use crate::context::RpcContext;
|
||||
use crate::s9pk::manifest::PackageId;
|
||||
use crate::util::Version;
|
||||
@@ -21,7 +22,7 @@ impl BackupActions {
|
||||
pkg_id: &PackageId,
|
||||
pkg_version: &Version,
|
||||
volumes: &Volumes,
|
||||
) -> Result<(), Error> {
|
||||
) -> Result<NoOutput, Error> {
|
||||
let mut volumes = volumes.to_readonly();
|
||||
volumes.insert(VolumeId::Backup, Volume::Backup { readonly: false });
|
||||
self.create
|
||||
@@ -37,7 +38,7 @@ impl BackupActions {
|
||||
.await?
|
||||
.map_err(|e| anyhow!("{}", e.1))
|
||||
.with_kind(crate::ErrorKind::Backup)?;
|
||||
Ok(())
|
||||
Ok(NoOutput)
|
||||
}
|
||||
|
||||
pub async fn restore(
|
||||
@@ -46,7 +47,7 @@ impl BackupActions {
|
||||
pkg_id: &PackageId,
|
||||
pkg_version: &Version,
|
||||
volumes: &Volumes,
|
||||
) -> Result<(), Error> {
|
||||
) -> Result<NoOutput, Error> {
|
||||
let mut volumes = volumes.clone();
|
||||
volumes.insert(VolumeId::Backup, Volume::Backup { readonly: true });
|
||||
self.restore
|
||||
@@ -62,6 +63,6 @@ impl BackupActions {
|
||||
.await?
|
||||
.map_err(|e| anyhow!("{}", e.1))
|
||||
.with_kind(crate::ErrorKind::Restore)?;
|
||||
Ok(())
|
||||
Ok(NoOutput)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ use indexmap::IndexMap;
|
||||
use patch_db::{DbHandle, DiffPatch, HasModel, Map, MapModel};
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::action::ActionImplementation;
|
||||
use crate::action::{ActionImplementation, NoOutput};
|
||||
use crate::config::Config;
|
||||
use crate::context::RpcContext;
|
||||
use crate::db::model::CurrentDependencyInfo;
|
||||
@@ -226,7 +226,7 @@ impl DependencyConfig {
|
||||
dependent_version: &Version,
|
||||
dependent_volumes: &Volumes,
|
||||
dependency_config: &Config,
|
||||
) -> Result<Result<(), String>, Error> {
|
||||
) -> Result<Result<NoOutput, String>, Error> {
|
||||
Ok(self
|
||||
.check
|
||||
.sandboxed(
|
||||
|
||||
Reference in New Issue
Block a user