arg parsing works

arg-parsing-better
Avril 4 years ago
parent a264a7b05d
commit 06208ee535
Signed by: flanchan
GPG Key ID: 284488987C31F630

@ -170,7 +170,9 @@ async fn normal(cfg: config::Config) -> eyre::Result<()>
async fn parse_mode() -> eyre::Result<()>
{
match arg::parse_args().wrap_err(eyre!("Failed to parse args"))?
match arg::parse_args()
.wrap_err(eyre!("Failed to parse args"))
.with_suggestion(|| "Try `--help`")?
{
arg::Mode::Normal(cfg) => {
#[cfg(debug_assertions)] eprintln!("cfg: {:#?}", cfg);

Loading…
Cancel
Save