mirror of
https://github.com/samsonjs/agate.git
synced 2026-03-25 09:05:50 +00:00
add version info flag
This commit is contained in:
parent
b7ffece867
commit
e00f8e5026
1 changed files with 5 additions and 0 deletions
|
|
@ -129,6 +129,7 @@ fn args() -> Result<Args> {
|
|||
);
|
||||
opts.optflag("s", "silent", "Disable logging output");
|
||||
opts.optflag("h", "help", "Print this help menu and exit.");
|
||||
opts.optflag("V", "version", "Print version information and exit.");
|
||||
opts.optflag(
|
||||
"3",
|
||||
"only-tls13",
|
||||
|
|
@ -151,6 +152,10 @@ fn args() -> Result<Args> {
|
|||
eprintln!("{}", opts.usage(&format!("Usage: {} [options]", &args[0])));
|
||||
std::process::exit(0);
|
||||
}
|
||||
if matches.opt_present("V") {
|
||||
eprintln!("agate {}", env!("CARGO_PKG_VERSION"));
|
||||
std::process::exit(0);
|
||||
}
|
||||
let mut hostnames = vec![];
|
||||
for s in matches.opt_strs("hostname") {
|
||||
hostnames.push(Host::parse(&s)?);
|
||||
|
|
|
|||
Loading…
Reference in a new issue