refactor(cable): more debug information for cable channels (#223)

This commit is contained in:
Alex Pasmantier 2025-01-06 13:39:41 +01:00 committed by GitHub
parent 074889b43f
commit 3d49d308c1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -99,12 +99,14 @@ impl Channel {
#[allow(clippy::unused_async)]
async fn load_candidates(command: String, injector: Injector<String>) {
debug!("Loading candidates from command: {:?}", command);
let output = shell_command()
.arg(command)
.output()
.expect("failed to execute process");
let decoded_output = String::from_utf8(output.stdout).unwrap();
debug!("Decoded output: {:?}", decoded_output);
for line in decoded_output.lines().collect::<HashSet<_>>() {
if !line.trim().is_empty() {