summaryrefslogtreecommitdiff
path: root/src/cmd/list.rs
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2020-12-23 09:44:31 +0200
committerLars Wirzenius <liw@liw.fi>2020-12-23 10:17:17 +0200
commit15ce048ca21ad517e27ab598d861ae07f817067d (patch)
tree01857ffa023c770164a9cc07d1024ed388150864 /src/cmd/list.rs
parentd6584921d8bb77fd4de8b6997848599cb9d73e01 (diff)
downloadobnam2-15ce048ca21ad517e27ab598d861ae07f817067d.tar.gz
feat! add a global --config option
This breaks all invocations of the Obnam client, as the option needs to come before the subcommand name. The benefit of this breakage is simpler, less repetitive code.
Diffstat (limited to 'src/cmd/list.rs')
-rw-r--r--src/cmd/list.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/cmd/list.rs b/src/cmd/list.rs
index 1741bce..6c48244 100644
--- a/src/cmd/list.rs
+++ b/src/cmd/list.rs
@@ -1,8 +1,6 @@
use crate::client::{BackupClient, ClientConfig};
-use std::path::Path;
-pub fn list(config: &Path) -> anyhow::Result<()> {
- let config = ClientConfig::read_config(&config)?;
+pub fn list(config: &ClientConfig) -> anyhow::Result<()> {
let client = BackupClient::new(&config.server_url)?;
for gen_id in client.list_generations()? {