Skip to main content

ctl_core/flags/
dry_run.rs

1use clap::Args;
2
3/// `-n/--dry-run`, with `--preview` as a visible alias.
4///
5/// The flag is a plain `bool`. A command that honours it validates and prints
6/// its plan, and writes nothing. A flag can join the struct in a minor
7/// release.
8#[derive(Args, Clone, Debug, Default, Eq, PartialEq)]
9#[command(about = None, long_about = None)]
10#[non_exhaustive]
11pub struct DryRunArgs {
12    /// Validate and print the plan. Write nothing.
13    #[arg(
14        short = 'n',
15        long,
16        visible_alias = "preview",
17        help_heading = "Execution"
18    )]
19    pub dry_run: bool,
20}