From f0718510aa3db9d0eaa9402b3b9ee15dc8089290 Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Sun, 10 Dec 2023 18:11:23 +0100 Subject: [PATCH] Fix yabridgectl sync flags in new CLI parser This behavior changed, and flags now explicitly need this action to function as flags. --- tools/yabridgectl/src/main.rs | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/tools/yabridgectl/src/main.rs b/tools/yabridgectl/src/main.rs index 060efcd1..0a29d431 100644 --- a/tools/yabridgectl/src/main.rs +++ b/tools/yabridgectl/src/main.rs @@ -16,7 +16,7 @@ use anyhow::Result; use clap::builder::TypedValueParser; -use clap::{command, value_parser, Arg, Command}; +use clap::{command, value_parser, Arg, ArgAction, Command}; use colored::Colorize; use std::collections::HashSet; use std::env; @@ -94,25 +94,29 @@ fn main() -> Result<()> { Arg::new("force") .short('f') .long("force") - .help("Always update files, even not necessary"), + .help("Always update files, even not necessary") + .action(ArgAction::SetTrue), ) .arg( Arg::new("no-verify") .short('n') .long("no-verify") - .help("Skip post-installation setup checks"), + .help("Skip post-installation setup checks") + .action(ArgAction::SetTrue), ) .arg( Arg::new("prune") .short('p') .long("prune") - .help("Remove unrelated or leftover .so files"), + .help("Remove unrelated or leftover .so files") + .action(ArgAction::SetTrue), ) .arg( Arg::new("verbose") .short('v') .long("verbose") - .help("Print information about plugins being set up or skipped"), + .help("Print information about plugins being set up or skipped") + .action(ArgAction::SetTrue), ), ) .subcommand(