trunk_build_time/cmd/
config.rs1use std::path::PathBuf;
2
3use anyhow::Result;
4use clap::{Args, Subcommand};
5
6use crate::config::ConfigOpts;
7
8#[derive(Clone, Debug, Args)]
10#[command(name = "config")]
11pub struct Config {
12 #[command(subcommand)]
13 action: ConfigSubcommands,
14}
15
16impl Config {
17 #[tracing::instrument(level = "trace", skip(self, config))]
18 pub async fn run(self, config: Option<PathBuf>) -> Result<()> {
19 match self.action {
23 ConfigSubcommands::Show => {
24 let cfg = ConfigOpts::full(config)?;
25 println!("{:#?}", cfg);
26 }
27 }
28 Ok(())
29 }
30}
31
32#[derive(Clone, Debug, Subcommand)]
33enum ConfigSubcommands {
34 Show,
36}