@@ -293,9 +293,12 @@ def load_boot_logo(source, target, env):
293293board_arch = infer_architecture (env .BoardConfig ())
294294should_skip_manifest = board_arch is None
295295
296- # For host/native envs, avoid depending on 'buildprog' (some targets don't define it)
297- mtjson_deps = [] if should_skip_manifest else ["buildprog" ]
298- if not should_skip_manifest and platform .name == "espressif32" :
296+ # Most platforms can generate the manifest as part of the default 'buildprog' target.
297+ # Typically this passes success/failure properly.
298+ mtjson_deps = ["buildprog" ]
299+ if platform .name == "espressif32" :
300+ # On ESP32, we need to explicitly depend upon the binary to prevent fake-success upon failure.
301+ mtjson_deps = ["$BUILD_DIR/${PROGNAME}.bin" ]
299302 # Build littlefs image as part of mtjson target
300303 # Equivalent to `pio run -t buildfs`
301304 target_lfs = env .DataToBin (
@@ -309,7 +312,8 @@ def skip_manifest(source, target, env):
309312
310313 env .AddCustomTarget (
311314 name = "mtjson" ,
312- dependencies = mtjson_deps ,
315+ # For host/native envs, avoid depending on 'buildprog' (some targets don't define it)
316+ dependencies = [],
313317 actions = [skip_manifest ],
314318 title = "Meshtastic Manifest (skipped)" ,
315319 description = "mtjson generation is skipped for native environments" ,
0 commit comments