xbp 10.17.2

XBP is a zero-config build pack that can also interact with proxies, kafka, sockets, synthetic monitors.
Documentation
use crate::cli::commands;
use crate::cli::error::{CliResult, ErrorFactory};
use crate::cli::ui;
use crate::commands::run_network;
use crate::logging::log_error;

pub async fn handle_network(cmd: commands::NetworkCmd, debug: bool) -> CliResult<()> {
    if let Err(e) =
        ui::with_loader("Applying network command", run_network(cmd.command, debug)).await
    {
        let _ = log_error("network", "Network command failed", Some(&e.to_string())).await;
        return Err(ErrorFactory::operation(
            "network",
            "run network command",
            e.to_string(),
            Some("Use `xbp network -h` for supported subcommands and flags."),
        ));
    }
    Ok(())
}