mirror of
https://github.com/esphome/esphome.git
synced 2026-10-02 09:20:22 +00:00
Guard the honored board_build branch against the empty-list form
voluptuous accepts [] for [cv.string], so vals[-1] could raise an IndexError at codegen time; an empty list now falls through to the ignored-option warning.
This commit is contained in:
@@ -1423,6 +1423,10 @@ async def test_add_platformio_options_native_arduino(
|
||||
assert (
|
||||
"esphome->platformio_options->board_build.filesystem is ignored" in caplog.text
|
||||
)
|
||||
# An empty list for an honored key is not a scalar; it falls through
|
||||
# to the ignored-option warning instead of an IndexError
|
||||
await config._add_platformio_options({"board_build.ldscript": []})
|
||||
assert "board_build.ldscript is ignored" in caplog.text
|
||||
assert "'arduino' toolchain" in caplog.text
|
||||
assert "upload_speed" not in caplog.text
|
||||
|
||||
|
||||
Reference in New Issue
Block a user