Skip to content

Commit e6b57a5

Browse files
MabezDevjessebraham
authored andcommitted
canonicalize the serial path
1 parent 0eab19c commit e6b57a5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

espflash/src/cli/serial.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ pub fn get_serial_port_info(
2222
let ports = detect_usb_serial_ports().unwrap_or_default();
2323

2424
if let Some(serial) = &matches.serial {
25-
find_serial_port(&ports, serial)
25+
find_serial_port(&ports, &std::fs::canonicalize(serial)?.to_string_lossy())
2626
} else if let Some(serial) = &config.connection.serial {
27-
find_serial_port(&ports, serial)
27+
find_serial_port(&ports, &std::fs::canonicalize(serial)?.to_string_lossy())
2828
} else {
2929
let (port, matches) = select_serial_port(ports, config)?;
3030

0 commit comments

Comments
 (0)