You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Leading newline in multiline upload_port breaks device monitor port resolution #5552
Run pio project config --json-output. No hardware is required for this step.
To see the runtime failure, substitute a connected device's serial port and run pio device monitor -e rx directly in an interactive terminal, without a pipe.
Actual results
The resolved upload_port and monitor_port values both contain a leading newline ("\n/dev/cu.usbmodem201301"). The monitor passes that string to pySerial and fails to open the port with No such file or directory, even though the device exists. Stating the same value on the assignment line (upload_port = /dev/cu.usbmodem201301) works.
Expected results
For these single-value serial port options, ignore surrounding whitespace after resolving the INI value and interpolation. The indented form with one port should resolve to the same path as the inline form. This would preserve the behavior of other multiline options.
Additional information
Python's ConfigParser accepts the continuation syntax and preserves the leading newline.
Activity