Improve serve command error message (#2017)
Update the command matcher for the server command to log a more helpful
message when it's called without a subcommand.
Before:
```sh
$ target/debug/grin server
:: Some(ArgMatches { args: {}, subcommand: None, usage: Some("USAGE:\n grin server [OPTIONS] [SUBCOMMAND]") })
```
After:
```sh
$ target/debug/grin server
Subcommand required, use 'grin help server' for details
```
This commit is contained in:
committed by
Ignotus Peverell
parent
1ea82d9abe
commit
9db36f7ba3
@@ -174,6 +174,9 @@ pub fn server_command(server_args: Option<&ArgMatches>, mut global_config: Globa
|
||||
}
|
||||
}
|
||||
("stop", _) => println!("TODO. Just 'kill $pid' for now. Maybe /tmp/grin.pid is $pid"),
|
||||
("", _) => {
|
||||
println!("Subcommand required, use 'grin help server' for details");
|
||||
}
|
||||
(cmd, _) => {
|
||||
println!(":: {:?}", server_args);
|
||||
panic!(
|
||||
|
||||
Reference in New Issue
Block a user