Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/config/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,13 @@ impl ArgsSpec {
/// Set up a [`clap::Command`] with config-related arguments.
pub fn setup(cmd: Command) -> Command {
cmd.args([
// Note: '--check-config' is a niche subcommand not really related
// to the rest of the configuration. If we add more such arguments
// it might be good to move them out of here.
clap::Arg::new("check_config")
.long("check-config")
.action(clap::ArgAction::SetTrue)
.help("Check the configuration and exit"),
Arg::new("state")
.long("state")
.value_name("PATH")
Expand Down
8 changes: 1 addition & 7 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,7 @@ fn main() -> ExitCode {
let cmd = clap::Command::new("cascade")
.version(crate_version!())
.author(crate_authors!())
.next_line_help(true)
.arg(
clap::Arg::new("check_config")
.long("check-config")
.action(clap::ArgAction::SetTrue)
.help("Check the configuration and exit"),
);
.next_line_help(true);
let cmd = Config::setup_cli(cmd);

// Process command-line arguments.
Expand Down