Skip to content

Commit 8df56df

Browse files
Fix: Preserve RFC2217 URLs in SerialPortFinder.find() in "device monitor" (#5226)
Fix: Preserve RFC2217 URLs in SerialPortFinder.find() Fixes #5225
1 parent 31d630b commit 8df56df

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

platformio/device/finder.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,10 @@ def match_device_hwid(patterns):
133133

134134
def find(self, initial_port=None):
135135
if initial_port:
136+
# Treat any URL (contains '://') as a literal port
137+
if "://" in initial_port:
138+
return initial_port
139+
# Otherwise fall back to existing wildcard logic
136140
if not is_pattern_port(initial_port):
137141
return initial_port
138142
return self.match_serial_port(initial_port)

0 commit comments

Comments
 (0)