Bug report: double /dev/ in STM32 serial upload

Hi. I was tinkering around Arduino IDE when I first tried the Bluepill STM32F103C8T6 board and I’ve successfully uploaded my program into it via serial. Then I wanted to try uploading a sample program to the Bluepill board with VSCode PlatformIO via serial too, this happened…
serialerror
I noticed that /dev/ was put into the bash command 2 times so it can’t actually detect the USB port. I tried finding out the solution through the Internet and thankfully I found one by changing the bash script according to this github issue.
I changed the line in ~/.platformio/packages/tool-stm32duino/serial_upload from this:

$(dirname $0)/stm32flash/stm32flash -g 0x8000000 -b 230400 -w "$4" /dev/"$1"

to this:

$(dirname $0)/stm32flash/stm32flash -g 0x8000000 -b 230400 -w "$4" "$1"

And it worked like a charm.

It would be nice for the devs to fix this up in the next release.

Is this the same as upload_port for Unix-based OS should be an absolute path · Issue #138 · platformio/platform-ststm32 · GitHub ?

Yes, it exactly is the same

The issue has been closed.