summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Beyer <matthias.beyer@atos.net>2021-03-11 08:31:51 +0100
committerMatthias Beyer <matthias.beyer@atos.net>2021-03-11 08:31:51 +0100
commitfb755aeeb60e5df4ba35671d593d602438a2ab3b (patch)
treeb3d8d5fdcb6ed6568e5f2401fba2345f8c030260
parent6a188e26815579a6de5ce4eee8271d3801e80f63 (diff)
Add more verbose error output if no subcommand is given
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
-rw-r--r--src/main.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs
index dc00524..bcd3631 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -228,7 +228,11 @@ async fn main() -> Result<()> {
error!("Use --help to find available subcommands");
return Err(anyhow!("Unknown subcommand: {}", other))
},
- None => return Err(anyhow!("No subcommand")),
+ None => {
+ error!("No subcommand.");
+ error!("Use --help to find available subcommands");
+ return Err(anyhow!("No subcommand"))
+ },
}
Ok(())