summaryrefslogtreecommitdiff
path: root/src/cmd/show_gen.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/show_gen.rs')
-rw-r--r--src/cmd/show_gen.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/cmd/show_gen.rs b/src/cmd/show_gen.rs
index 006e0e0..970a165 100644
--- a/src/cmd/show_gen.rs
+++ b/src/cmd/show_gen.rs
@@ -1,5 +1,6 @@
//! The `show-generation` subcommand.
+use crate::chunk::ClientTrust;
use crate::client::BackupClient;
use crate::config::ClientConfig;
use crate::error::ObnamError;
@@ -27,8 +28,13 @@ impl ShowGeneration {
async fn run_async(&self, config: &ClientConfig) -> Result<(), ObnamError> {
let temp = NamedTempFile::new()?;
let client = BackupClient::new(config)?;
+ let trust = client
+ .get_client_trust()
+ .await?
+ .or_else(|| Some(ClientTrust::new("FIXME", None, "".to_string(), vec![])))
+ .unwrap();
- let genlist = client.list_generations().await?;
+ let genlist = client.list_generations(&trust);
let gen_id = genlist.resolve(&self.gen_id)?;
let gen = client.fetch_generation(&gen_id, temp.path()).await?;
let mut files = gen.files()?;