1use abscissa_core::{status_err, Application, Command, Runnable, Shutdown};
4use clap::Args;
5use pace_core::prelude::DocsCommandOptions;
6
7use crate::application::PACE_APP;
8
9#[derive(Command, Debug, Args, Clone)]
11pub struct DocsCmd {
12 #[clap(flatten)]
14 docs_opts: DocsCommandOptions,
15}
16
17impl Runnable for DocsCmd {
18 fn run(&self) {
19 match self.docs_opts.handle_docs() {
20 Ok(user_message) => user_message.display(),
21 Err(err) => {
22 status_err!("{}", err);
23 PACE_APP.shutdown(Shutdown::Crash);
24 }
25 };
26 }
27}