Skip to content

YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context

fix CABLE virtual device test when virtual device driver not installed

Joe Goldin5cfa40a73646
diff --git a/screenpipe-audio/tests/windows_output_device_tests.rs b/screenpipe-audio/tests/windows_output_device_tests.rs
index a5bf57130..ce20e1cef 100644
--- a/screenpipe-audio/tests/windows_output_device_tests.rs
+++ b/screenpipe-audio/tests/windows_output_device_tests.rs
@@ -15,10 +15,10 @@ mod tests {
async fn test_virtual_audio_device() -> anyhow::Result<()> {
// List devices and find the virtual output device
let devices = list_audio_devices().await?;
- let virtual_device = devices
- .iter()
- .find(|d| d.name.contains("CABLE Output"))
- .unwrap();
+ let virtual_device = match devices.iter().find(|d| d.name.contains("CABLE Output")) {
+ Some(device) => device,
+ None => return Ok(()), // Silently return if device not found
+ };
println!("Found virtual device: {:?}", virtual_device.name);