🐛 fix(cli): correct output format for label list

- 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
This commit is contained in:
Jeremiah Russell
2025-10-09 11:14:27 +01:00
committed by Jeremiah Russell
parent 0a537e4df7
commit d6ee9f5227

View File

@@ -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(())
}
}