Skip to content

Commit

Permalink
Escape needed for WSL
Browse files Browse the repository at this point in the history
  • Loading branch information
Gator96100 committed Feb 10, 2021
1 parent a265888 commit 028bf22
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pm3
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ function get_pm3_list_WSL {
fi

# Normal SERIAL PORTS (COM)
for DEV in $($PSHEXE -command "Get-CimInstance -ClassName Win32_serialport | Where-Object {$_.PNPDeviceID -like '*VID_9AC4&PID_4B8F*' -or $_.PNPDeviceID -like '*VID_2D2D&PID_504D*'} | Select DeviceID" 2>/dev/null | sed -nr 's#^COM([0-9]+)\b#/dev/ttyS\1#p'); do
for DEV in $($PSHEXE -command "Get-CimInstance -ClassName Win32_serialport | Where-Object {\$_.PNPDeviceID -like '*VID_9AC4&PID_4B8F*' -or \$_.PNPDeviceID -like '*VID_2D2D&PID_504D*'} | Select DeviceID" 2>/dev/null | sed -nr 's#^COM([0-9]+)\b#/dev/ttyS\1#p'); do
# ttyS counterpart takes some more time to appear
if [ -e "$DEV" ]; then
PM3LIST+=("$DEV")
Expand Down

0 comments on commit 028bf22

Please sign in to comment.