main: fix error message when a serial port can't be accessed

Old message:

    error: failed to reset port /tmp/tinygo1441085170/main.uf2: opening port: Permission denied

new message:

    error: failed to reset port /dev/ttyACM0: opening port: Permission denied
Этот коммит содержится в:
Ayke van Laethem 2022-10-16 16:11:02 +02:00 коммит произвёл Ron Evans
родитель 2b04006b1e
коммит c32490935b

Просмотреть файл

@ -401,7 +401,7 @@ func Flash(pkgName, port string, options *compileopts.Options) error {
if err == nil { if err == nil {
err = touchSerialPortAt1200bps(port) err = touchSerialPortAt1200bps(port)
if err != nil { if err != nil {
return &commandError{"failed to reset port", result.Binary, err} return &commandError{"failed to reset port", port, err}
} }
// give the target MCU a chance to restart into bootloader // give the target MCU a chance to restart into bootloader
time.Sleep(3 * time.Second) time.Sleep(3 * time.Second)