summaryrefslogtreecommitdiff
path: root/src/cmd/show_config.rs
blob: 7ac52eca09b829dc21a5b0144be424342213975b (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 structopt::StructOpt;

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

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