mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-12-22 13:45:20 +00:00
ch-remote: Fix crash when run with no subcommand
ch-remote crashes when run with --api-socket but no subcommand: $ target/release/ch-remote --api-socket /tmp/api thread 'main' panicked at src/bin/ch-remote.rs:509:14: internal error: entered unreachable code Use clap::Command::subcommand_required(true) to yield a more friendly error in this case. Signed-off-by: Chris Webb <chris@arachsys.com>
This commit is contained in:
parent
07560c596d
commit
5627c26405
@ -898,6 +898,7 @@ fn main() {
|
|||||||
.author(env!("CARGO_PKG_AUTHORS"))
|
.author(env!("CARGO_PKG_AUTHORS"))
|
||||||
.version(env!("BUILD_VERSION"))
|
.version(env!("BUILD_VERSION"))
|
||||||
.about("Remotely control a cloud-hypervisor VMM.")
|
.about("Remotely control a cloud-hypervisor VMM.")
|
||||||
|
.subcommand_required(true)
|
||||||
.args([
|
.args([
|
||||||
Arg::new("api-socket")
|
Arg::new("api-socket")
|
||||||
.long("api-socket")
|
.long("api-socket")
|
||||||
|
Loading…
Reference in New Issue
Block a user