machine_check_hw/
prepare.rs

1use cargo_metadata::camino::Utf8PathBuf;
2use clap::Args;
3
4use crate::CheckError;
5
6#[derive(Debug, Clone, Args)]
7pub struct Cli {
8    /// Location of preparation directory, defaults to "machine-check-preparation" next to the executable.
9    #[arg(long)]
10    pub preparation_path: Option<Utf8PathBuf>,
11
12    /// Remove the preparation directory and its content instead of creating/updating it.
13    #[arg(long)]
14    pub clean: bool,
15}
16
17pub(crate) fn prepare(_: super::Cli, prepare: Cli) -> Result<(), CheckError> {
18    machine_check_compile::prepare(machine_check_compile::PrepareConfig {
19        preparation_path: prepare.preparation_path,
20        clean: prepare.clean,
21    })?;
22    Ok(())
23}