summaryrefslogtreecommitdiff
path: root/src/cmd/show_config.rs
blob: 8e0ce30a6fbbffa1976b265d4967ebfe03a159f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! The `show-config` subcommand.

use crate::config::ClientConfig;
use crate::error::ObnamError;
use clap::Parser;

/// Show actual client configuration.
#[derive(Debug, Parser)]
pub struct ShowConfig {}

impl ShowConfig {
    /// Run the command.
    pub fn run(&self, config: &ClientConfig) -> Result<(), ObnamError> {
        println!("{}", serde_json::to_string_pretty(config)?);
        Ok(())
    }
}