Don't let a missing serial listing discard an 'all' discovery on Windows
Windows discovery tool / windows (push) Successful in 53s

Windows CI (run 415) ran the discovery tests: 48 passed and one failed,
because port listing reads Linux sysfs and the test assumed it exists.
That is a real limitation, not just a bad test - and in the example it
meant `all` would listen and sweep and then abort on the serial step,
throwing the results away.

The serial step in `all` is now a printed note on failure; the standalone
`serial` command still errors. The Linux-only test is gated to Linux and
a counterpart asserts that off Linux the listing is an error, not a clean
empty result.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-29 11:17:01 +00:00
co-authored by Claude Sonnet 5.5
parent fe2bfc7d52
commit 59b118159c
2 changed files with 17 additions and 1 deletions
+6 -1
View File
@@ -69,7 +69,12 @@ async fn main() -> anyhow::Result<()> {
// picking one would mean probing a network nobody named.
None => println!("(no subnet given, so no sweep - pass one like 192.168.0.0/24 to include it)"),
}
found.extend(list_serial()?);
// Not `?`: serial listing reads Linux sysfs and fails on any other
// OS, and that must not throw away what the listen and sweep found.
match list_serial() {
Ok(ports) => found.extend(ports),
Err(err) => println!("(serial ports skipped: {err})"),
}
found
}
"listen" | "raw" => {