Fix panic! when reaching unreachable!, because imag doesnt do anything without an argument or subcommand
This commit is contained in:
parent
7023d1f202
commit
c828bed0e1
1 changed files with 1 additions and 1 deletions
|
@ -114,7 +114,7 @@ fn main() {
|
||||||
let commands = get_commands();
|
let commands = get_commands();
|
||||||
let helptext = help_text(commands);
|
let helptext = help_text(commands);
|
||||||
let app = Runtime::get_default_cli_builder(appname, version, about)
|
let app = Runtime::get_default_cli_builder(appname, version, about)
|
||||||
.settings(&[AppSettings::AllowExternalSubcommands])
|
.settings(&[AppSettings::AllowExternalSubcommands, AppSettings::ArgRequiredElseHelp])
|
||||||
.arg(Arg::with_name("version")
|
.arg(Arg::with_name("version")
|
||||||
.long("version")
|
.long("version")
|
||||||
.takes_value(false)
|
.takes_value(false)
|
||||||
|
|
Loading…
Reference in a new issue