mirror of
https://github.com/mimblewimble/grin.git
synced 2025-02-01 17:01:09 +03:00
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:
parent
1ea82d9abe
commit
9db36f7ba3
1 changed files with 3 additions and 0 deletions
|
@ -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"),
|
("stop", _) => println!("TODO. Just 'kill $pid' for now. Maybe /tmp/grin.pid is $pid"),
|
||||||
|
("", _) => {
|
||||||
|
println!("Subcommand required, use 'grin help server' for details");
|
||||||
|
}
|
||||||
(cmd, _) => {
|
(cmd, _) => {
|
||||||
println!(":: {:?}", server_args);
|
println!(":: {:?}", server_args);
|
||||||
panic!(
|
panic!(
|
||||||
|
|
Loading…
Reference in a new issue