mirror of
https://github.com/orhun/systeroid
synced 2024-10-02 21:53:31 +00:00
fix(args): check for version flag before processing values
This commit is contained in:
parent
ff1a28ed26
commit
adcb7b6724
|
@ -133,6 +133,9 @@ impl Args {
|
|||
});
|
||||
println!("{}", usage);
|
||||
None
|
||||
} else if matches.opt_present("V") {
|
||||
println!("{} {}", env!("CARGO_PKG_NAME"), env!("CARGO_PKG_VERSION"));
|
||||
None
|
||||
} else if !required_args_present {
|
||||
eprintln!(
|
||||
"{}: no variables specified\n\
|
||||
|
@ -141,9 +144,6 @@ impl Args {
|
|||
env!("CARGO_PKG_NAME")
|
||||
);
|
||||
None
|
||||
} else if matches.opt_present("V") {
|
||||
println!("{} {}", env!("CARGO_PKG_NAME"), env!("CARGO_PKG_VERSION"));
|
||||
None
|
||||
} else {
|
||||
let display_type = if matches.opt_present("N") {
|
||||
DisplayType::Name
|
||||
|
|
Loading…
Reference in a new issue