Update clap crate configuration.

This commit is contained in:
Eduard Tolosa 2019-04-23 00:01:48 -05:00
parent 9c774d6bad
commit d04e5b8f0c
3 changed files with 5 additions and 5 deletions

View file

@ -2,6 +2,9 @@ name: blackarch-devtools
version: "0.1.2" version: "0.1.2"
author: Eduard Tolosa <tolosaeduard@gmail.com> author: Eduard Tolosa <tolosaeduard@gmail.com>
about: Development tools for BlackArch Linux about: Development tools for BlackArch Linux
settings:
- ArgRequiredElseHelp
- StrictUtf8
args: args:
- setup: - setup:
short: s short: s

View file

@ -196,7 +196,7 @@ pub fn build_package_with_missing_deps(missing: &[&str]) {
&missing &missing
.split("/") .split("/")
.last() .last()
.expect("Failed to gest package name."), .expect("Failed to get package name."),
] ]
.concat(); .concat();
println!("{}", &missing); println!("{}", &missing);

View file

@ -9,10 +9,7 @@ mod functions;
fn main() { fn main() {
let yaml = load_yaml!("cli.yml"); let yaml = load_yaml!("cli.yml");
let matches = App::from_yaml(yaml) let matches = App::from_yaml(yaml).get_matches();
.setting(AppSettings::ArgRequiredElseHelp)
.setting(AppSettings::StrictUtf8)
.get_matches();
if matches.is_present("setup") { if matches.is_present("setup") {
functions::setup_chroot(); functions::setup_chroot();
} else if matches.is_present("build") { } else if matches.is_present("build") {