On 14.04.2025 17:44, Stefan Hanreich wrote:
[snip]
+fn main() -> Result<(), Error> {
+    let mut args = Arguments::from_env();
+
+    let parsed_command = args.subcommand()?
+        .ok_or_else(|| format_err!("no subcommand specified"))?

Maybe we could print HELP here again? So that you don't have to guess
the subcommands.

+        .parse();
+
+    if let Ok(command) = parsed_command {
+        run_command(command)
+    } else {
+        eprintln!("Invalid command specified!\n{}", HELP);
+        std::process::exit(1);
+    }
+
+}

Also this file needs a `cargo fmt` :)

Otherwise the whole series looks good, consider:
Reviewed-by: Gabriel Goller <g.gol...@proxmox.com>
Tested-by: Gabriel Goller <g.gol...@proxmox.com>


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to