diff options
author | Joel Challis <git@zvecr.com> | 2022-10-31 20:16:43 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-31 20:16:43 +0000 |
commit | 96c48a5f4aa461ed31fd4ee61151ac206e16fb5f (patch) | |
tree | adc6db0db45559adfea4f056de5c1434ed6a0d15 /platforms | |
parent | a45607f4e6e0f5b7a40d655c10e6bc79272cd4d5 (diff) |
Refactor to avoid deprecated wmic execution (#18122)
* wmic deprecated?
* Update platforms/avr/flash.mk
* Update platforms/avr/flash.mk
Diffstat (limited to 'platforms')
-rw-r--r-- | platforms/avr/flash.mk | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/platforms/avr/flash.mk b/platforms/avr/flash.mk index c104f730b3..e058e8d296 100644 --- a/platforms/avr/flash.mk +++ b/platforms/avr/flash.mk @@ -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 \ |