Skip to content

Commit

Permalink
Refactor to avoid deprecated wmic execution (qmk#18122)
Browse files Browse the repository at this point in the history
* wmic deprecated?

* Update platforms/avr/flash.mk

* Update platforms/avr/flash.mk
  • Loading branch information
zvecr authored and ramonimbao committed Nov 28, 2022
1 parent f3f9553 commit d907017
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion platforms/avr/flash.mk
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ AVRDUDE_PROGRAMMER ?= avrdude
define EXEC_AVRDUDE
list_devices() { \
if $(GREP) -q -s icrosoft /proc/version; then \
wmic.exe path Win32_SerialPort get DeviceID 2>/dev/null | LANG=C perl -pne 's/COM(\d+)/COM.($$1-1)/e' | sed 's!COM!/dev/ttyS!' | xargs echo -n | sort; \
powershell.exe 'Get-CimInstance -Class Win32_SerialPort | Select -ExpandProperty "DeviceID"' 2>/dev/null | sed -e "s/\r//g" | LANG=C perl -pne 's/COM(\d+)/COM.($$1-1)/e' | sed 's!COM!/dev/ttyS!' | sort; \
elif [ "`uname`" = "FreeBSD" ]; then \
ls /dev/tty* | grep -v '\.lock$$' | grep -v '\.init$$'; \
else \
Expand Down

0 comments on commit d907017

Please sign in to comment.