obnam/cmd/
show_config.rs

1//! The `show-config` subcommand.
2
3use crate::config::ClientConfig;
4use crate::error::ObnamError;
5use structopt::StructOpt;
6
7/// Show actual client configuration.
8#[derive(Debug, StructOpt)]
9pub struct ShowConfig {}
10
11impl ShowConfig {
12    /// Run the command.
13    pub fn run(&self, config: &ClientConfig) -> Result<(), ObnamError> {
14        println!("{}", serde_json::to_string_pretty(config)?);
15        Ok(())
16    }
17}