wash_cli/common/
label_cmd.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
use anyhow::Result;

use wash_lib::cli::{
    label::{handle_label_host, LabelHostCommand},
    CommandOutput, OutputKind,
};

use crate::appearance::spinner::Spinner;

pub async fn handle_command(
    cmd: LabelHostCommand,
    output_kind: OutputKind,
) -> Result<CommandOutput> {
    let sp: Spinner = Spinner::new(&output_kind)?;
    let out = handle_label_host(cmd).await?;
    sp.finish_and_clear();

    Ok(out)
}