From d22e7150d7adb2091e1f521866dcedf27110fda7 Mon Sep 17 00:00:00 2001 From: Benjamin-Tan Date: Sat, 30 Mar 2024 14:18:09 +0800 Subject: [PATCH] Change arg require else help --- src/main.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 4465856..85eca80 100644 --- a/src/main.rs +++ b/src/main.rs @@ -13,8 +13,9 @@ use std::process::Stdio; #[command(name = "sysdep")] #[command(version = "0.1.0")] #[command(about = "A simple system dependency tool to list/install the apt/pip dependencies", long_about = None)] +#[command(arg_required_else_help = true)] struct Cli { - #[arg(value_enum, default_value_t=CliCommand::List)] + #[arg(value_enum)] command: CliCommand, /// Please include the path with the quote, e.g. './**/' #[arg(default_value = ".")]