From c828bed0e15cb7b545403c49a1c3b56c53f26488 Mon Sep 17 00:00:00 2001 From: Mario Krehl Date: Wed, 7 Sep 2016 10:37:16 +0200 Subject: [PATCH] Fix panic! when reaching unreachable!, because imag doesnt do anything without an argument or subcommand --- bin/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/src/main.rs b/bin/src/main.rs index de383068..b708b861 100644 --- a/bin/src/main.rs +++ b/bin/src/main.rs @@ -114,7 +114,7 @@ fn main() { let commands = get_commands(); let helptext = help_text(commands); let app = Runtime::get_default_cli_builder(appname, version, about) - .settings(&[AppSettings::AllowExternalSubcommands]) + .settings(&[AppSettings::AllowExternalSubcommands, AppSettings::ArgRequiredElseHelp]) .arg(Arg::with_name("version") .long("version") .takes_value(false)