From d6ee9f5227deccbc5a9fe774eae5b51ec7de51c6 Mon Sep 17 00:00:00 2001 From: Jeremiah Russell Date: Thu, 9 Oct 2025 11:14:27 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(cli):=20correct=20output=20f?= =?UTF-8?q?ormat=20for=20label=20list?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - change the output format for label list from logging to printing to the console - modify the loop logic to output labels in a comma-separated format --- src/config_cli/label_cli/list_cli.rs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/config_cli/label_cli/list_cli.rs b/src/config_cli/label_cli/list_cli.rs index 2eef597..b6debb3 100644 --- a/src/config_cli/label_cli/list_cli.rs +++ b/src/config_cli/label_cli/list_cli.rs @@ -15,10 +15,15 @@ impl ListCli { return Err(Error::RuleNotFound(self.id)); }; - for label in rule.labels() { - log::info!("Label in rule: `{label}`"); + print!("Labels in rule: "); + for (i, label) in rule.labels().iter().enumerate() { + if i != 0 { + print!(", {label}"); + } else { + print!("`{label}"); + } } - + println!("`"); Ok(()) } }