From ef2f16713aefedb7cfcfea03a16c04a8339ea454 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Thu, 20 Aug 2026 19:02:35 -0500 Subject: [PATCH] Widen the post-compile idedata guard to every failure the comment promises --- esphome/__main__.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/esphome/__main__.py b/esphome/__main__.py index 90737fce4b..f1b0fb7592 100644 --- a/esphome/__main__.py +++ b/esphome/__main__.py @@ -857,8 +857,11 @@ def compile_program(args: ArgsProtocol, config: ConfigType) -> int: toolchain.create_elf_copy() try: toolchain.get_idedata() - except EsphomeError as err: - # The firmware already built; idedata is a bonus artifact here + except (EsphomeError, OSError, RuntimeError, ValueError) as err: + # The firmware already built; idedata is a bonus artifact here. + # Broad on purpose: a vanished compiler (OSError), a failed + # include probe (RuntimeError), or a truncated compile DB + # (ValueError) must not fail a successful build either. _LOGGER.warning("Could not generate idedata: %s", err) else: from esphome.platformio import toolchain