mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
ch-remote: Make snapshot and restore config arguments required
The snapshot and restore subcommands in ch-remote had optional snapshot_config and restore_config arguments, but the implementation was unconditionally unwrapping them. This change marks these arguments as required to handle the missing argument validation and report a proper error message instead of letting the application panic. Signed-off-by: Andrei Vagin <avagin@google.com>
This commit is contained in:
committed by
Rob Bradford
parent
14717a94a3
commit
1b0dfc0da3
@@ -1127,6 +1127,7 @@ fn get_cli_commands_sorted() -> Box<[Command]> {
|
||||
.arg(
|
||||
Arg::new("restore_config")
|
||||
.index(1)
|
||||
.required(true)
|
||||
.help(RestoreConfig::SYNTAX),
|
||||
),
|
||||
Command::new("resume").about("Resume the VM"),
|
||||
@@ -1144,6 +1145,7 @@ fn get_cli_commands_sorted() -> Box<[Command]> {
|
||||
.arg(
|
||||
Arg::new("snapshot_config")
|
||||
.index(1)
|
||||
.required(true)
|
||||
.help("<destination_url>"),
|
||||
),
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user