mirror of
https://github.com/samsonjs/agate.git
synced 2026-03-25 09:05:50 +00:00
Merge pull request #37 from 06kellyjac/no_help_error
help exit with code 0
This commit is contained in:
commit
ec1b587f2f
2 changed files with 4 additions and 2 deletions
|
|
@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
## [Unreleased]
|
||||
|
||||
* Have help exit with successfully with `0` rather than `1`
|
||||
|
||||
## [2.5.2] - 2021-02-12
|
||||
|
||||
### Fixed
|
||||
|
|
|
|||
|
|
@ -146,8 +146,8 @@ fn args() -> Result<Args> {
|
|||
|
||||
let matches = opts.parse(&args[1..]).map_err(|f| f.to_string())?;
|
||||
if matches.opt_present("h") {
|
||||
let usage = opts.usage(&format!("Usage: {} [options]", &args[0]));
|
||||
return Err(usage.into());
|
||||
eprintln!("{}", opts.usage(&format!("Usage: {} [options]", &args[0])));
|
||||
std::process::exit(0);
|
||||
}
|
||||
let mut hostnames = vec![];
|
||||
for s in matches.opt_strs("hostname") {
|
||||
|
|
|
|||
Loading…
Reference in a new issue